Bitcoin Forum
December 10, 2016, 04:35:14 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Errors when using self-made transactions  (Read 787 times)
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 12, 2011, 03:48:10 AM
 #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

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
1481387714
Hero Member
*
Offline Offline

Posts: 1481387714

View Profile Personal Message (Offline)

Ignore
1481387714
Reply with quote  #2

1481387714
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481387714
Hero Member
*
Offline Offline

Posts: 1481387714

View Profile Personal Message (Offline)

Ignore
1481387714
Reply with quote  #2

1481387714
Report to moderator
twobitcoins
Full Member
***
Offline Offline

Activity: 144


View Profile
August 12, 2011, 04:09:36 AM
 #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.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 12, 2011, 01:15:26 PM
 #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

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 13, 2011, 02:48:16 AM
 #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)


Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 14, 2011, 08: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...)

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!