Author

Topic: What is wrong with this raw transaction? (Read 714 times)

legendary
Activity: 3472
Merit: 4801
November 07, 2013, 01:03:11 PM
#4
It's a pity the error handling for the raw transactions API is so minimal.

+1
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
November 07, 2013, 08:33:36 AM
#3
Seems like the txid referenced in the vin doesn't exist. Both my localbitcoind and blockchain.info don't know about it.

Ah - thanks for that (I know what I've done wrong now).

It's a pity the error handling for the raw transactions API is so minimal.
legendary
Activity: 1974
Merit: 1029
November 07, 2013, 08:18:35 AM
#2
Seems like the txid referenced in the vin doesn't exist. Both my localbitcoind and blockchain.info don't know about it.

Code:
$ bitcoind getrawtransaction 28e8b0039033c7765cbe5f8d6288321801361630468e42edd171d8fc759b68c6
error: {"code":-5,"message":"No information available about transaction"}

I'm running with txindex=1.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
November 07, 2013, 07:10:46 AM
#1
I have the following raw transaction (which was created via "createrawtransaction" and successfully signed with "signrawtransaction"):

Code:
0100000001c6689b75fcd871d1ed428e4630163601183288628d5fbe5c76c7339003b0e828000000008b48304502203deb0b9f61c88bc2bb5df24acb330b6cf1f2b9b8140203cafbf5db29935dd2a60221009c7c5fc049daf358ec392c0387022218b971a2f0c50386947e3b30c71f4bd2d201410408dc1b7167df71b68c12ec0a7e77ccb602cbcb1966f3bff773c925530905d3996e7a6c7eb8a404d5dbebff428ed36d1b9c8ab70dfebe9e80e0bd6b1dd298b677ffffffff01807c4301000000001976a91407dd428c4c6f8752d5ded10edabab12d912de14e88ac00000000

which if I paste after decoderawtransaction gives me the following:

Code:
{
"txid" : "c4b58d28e59e08c6cfa6272a8b56471896833aa20a5f2b05a952e6f9f0421e46",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "28e8b0039033c7765cbe5f8d6288321801361630468e42edd171d8fc759b68c6",
"vout" : 0,
"scriptSig" : {
"asm" : "304502203deb0b9f61c88bc2bb5df24acb330b6cf1f2b9b8140203cafbf5db29935dd2a60221009c7c5fc049daf358ec392c0387022218b971a2f0c50386947e3b30c71f4bd2d201 0408dc1b7167df71b68c12ec0a7e77ccb602cbcb1966f3bff773c925530905d3996e7a6c7eb8a404d5dbebff428ed36d1b9c8ab70dfebe9e80e0bd6b1dd298b677",
"hex" : "48304502203deb0b9f61c88bc2bb5df24acb330b6cf1f2b9b8140203cafbf5db29935dd2a60221009c7c5fc049daf358ec392c0387022218b971a2f0c50386947e3b30c71f4bd2d201410408dc1b7167df71b68c12ec0a7e77ccb602cbcb1966f3bff773c925530905d3996e7a6c7eb8a404d5dbebff428ed36d1b9c8ab70dfebe9e80e0bd6b1dd298b677"
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 0.21200000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 07dd428c4c6f8752d5ded10edabab12d912de14e OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a91407dd428c4c6f8752d5ded10edabab12d912de14e88ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"1iankj4HSpksoUgXSm8G7Gf7dkvLP3V9d"
]
}
}
]
}

but if I attempt to send it using sendrawtransaction then I get the TX rejected (code -22) error (which I think is normally for badly formatted JSON data).
Jump to: