Author

Topic: Errors when using self-made transactions (Read 979 times)

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 14, 2011, 03:46:57 PM
#5
I managed to get it working when there's only one input

I read the C++ sources but I can't find any clue (I can't find where the write method of Stream is defined...)
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 12, 2011, 09:48:16 PM
#4
It seems (in the french subforum) that the client source use this syntax:
Code:
      -the transaction         (classe CTransaction)
      -hashBlock  (0 because it's not broadcasted yet)  (classe CMerkleTx)
      -vMerkleBranch  (classe CMerkleTx)
      -nIndex  (classe CMerkleTx)
      -vtxPrev (classe WalletTx)
      -mapValue (classe WalletTx)
      -vOrderForm (classe WalletTx)
      -fTimeReceivedIsTxTime (classe WalletTx)
      -nTimeReceived(classe WalletTx)
      -fFromMe (classe WalletTx)
      -fSpent (classe WalletTx)

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 12, 2011, 08:15:26 AM
#3
Yes, I forgot to delete SIGHASH I used before
I edited, no more 01000000 and the hash is now 3a30caeb095a6a46878f25d0aa418eb6758bc58bb41fe39426145796789e98a5
But bitcoin still throw me these errors

It's a testnet tx, i don't think it's relevant but maybe
full member
Activity: 144
Merit: 100
August 11, 2011, 11:09:36 PM
#2
What is the final 01000000 at the end of the transaction?  I would expect it to end with the nLockTime = 00000000.

Edit: I guess it is SIGHASH_ALL which you used while signing.  That isn't part of the actual transaction.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 11, 2011, 10:48:10 PM
#1
Hi,
When I make and import a tx into my wallet I got some errors when I run Bitcoin:
Code:
************************
EXCEPTION: NSt8ios_base7failureE      
CDataStream::read() : end of data      
bitcoin in AppInit()      



************************
EXCEPTION: NSt8ios_base7failureE      
CDataStream::read() : end of data      
bitcoin in CMyApp::OnUnhandledException()      

terminate called after throwing an instance of 'std::ios_base::failure'
  what():  CDataStream::read() : end of data

My transaction is:
Code:
01000000

01     #input
500892538f59ad5b84ec342a90830fc0bb54c99188e4374d808357e6820a40ce
01000000
8b
48
3045022100a7e46423d8377a9af24cb7387ebe49b9f4e550db612b5ce7c598c41b25ee207e0220042acdf87818dbc4579a95c541f3936077867f07c61bfb04c6226101ac39807001
41
04fe8915c44a955dcaa0af2da00a20d44c6d94ffc9c719382bda18af5ad500a17390380f89a7510e2712b3866509f2ff9c6f6b942efd347d05a3144e4fae723a49
ffffffff

01      #output
ec9e9c0000000000
19
76
a9
14
ef833c585f12d8376fef2aaf661ab0fb00ba63f5
88
ac
00000000
Its hash is 3a30caeb095a6a46878f25d0aa418eb6758bc58bb41fe39426145796789e98a5


The import function works correctly, it has been tested many times, so the tx must be the problem but I can't see why
Jump to: