I'm running a bitcoind regtest node. When trying to relay a transaction (created using bitcoin-ruby) I receive
error: {"code":-25,"message":""}
When I restart the node and relay the exact same transaction it relays fine. This behavior is consistent and reproduces every time.
My output for decoderawtransaction
is:
{
"txid" : "df91267ed650795245882bc91b8dc104e6c41d2f29ed3221f29151aa60554842",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "fab40dbf6b95ef2fe5f4aca0668a84edebdf70cfb80565626be80c7af20a525e",
"vout" : 0,
"scriptSig" : {
"asm" : "0 3046022100fb2a69546ea44db3a06cfcf120d1fda135bfde0946f2186a52d8cfee83835705022100c680cc5135174425ce5137a2996fbdcd55463c4acb88bb9fdbdb03f70f0a213b01 30460221008294d1779bfb21240859feccc96104dea574541d41163d2c849846d8e44496fe022100faf00dabba65f22469a1116ea10d5ce34f90bea779ba770ae1ac3af5c432379e01 52210261318d096a7addf67d935076c28dfa4a1c0e8f2ed04a7cb47ac53bd7fe2ebe6d210397866513a1796e75aae6a53d54d0ccc904c56fa12e14ab0ee989a6eed6e29c0352ae",
"hex" : "00493046022100fb2a69546ea44db3a06cfcf120d1fda135bfde0946f2186a52d8cfee83835705022100c680cc5135174425ce5137a2996fbdcd55463c4acb88bb9fdbdb03f70f0a213b014930460221008294d1779bfb21240859feccc96104dea574541d41163d2c849846d8e44496fe022100faf00dabba65f22469a1116ea10d5ce34f90bea779ba770ae1ac3af5c432379e014c4752210261318d096a7addf67d935076c28dfa4a1c0e8f2ed04a7cb47ac53bd7fe2ebe6d210397866513a1796e75aae6a53d54d0ccc904c56fa12e14ab0ee989a6eed6e29c0352ae"
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 1.00000000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_HASH160 ee7455fa97980531b90b15f5f18386122a7f6919 OP_EQUAL",
"hex" : "a914ee7455fa97980531b90b15f5f18386122a7f691987",
"reqSigs" : 1,
"type" : "scripthash",
"addresses" : [
"2NEz4B6YtgTCpv6Qv56f7HarXUeHeLmdmih"
]
}
},
{
"value" : 0.99990000,
"n" : 1,
"scriptPubKey" : {
"asm" : "OP_HASH160 0b607311f3db7d2a28b4c6fd259913356a86c302 OP_EQUAL",
"hex" : "a9140b607311f3db7d2a28b4c6fd259913356a86c30287",
"reqSigs" : 1,
"type" : "scripthash",
"addresses" : [
"2MtHNxpeYfFmLTMDnW7DFf9y9ZnM49u4tXW"
]
}
}
]
}
The referenced txout has 2 BTC. I also tried sendrawtransaction <hex>, true
to try and rule out some fee problems. Same symptom.
I didn't see any special debug message in debug.log
My output for getinfo
is:
{
"version" : 90300,
"protocolversion" : 70002,
"walletversion" : 60000,
"balance" : 530.90534322,
"blocks" : 460,
"timeoffset" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00000000,
"testnet" : false,
"keypoololdest" : 1421187525,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"relayfee" : 0.00001000,
"errors" : ""
}
I'm still trying to plug v0.10 into my environment for debugging, I understand bitcoin-core has better messages for code -25, but I still need this to play nice with a v0.9 node.
getrawmempool
to verify there isn't a conflicting tx in the mempool andgetblock
to verify there isn't a conflicting tx in the blocks you mined? Also,gettxout
to ensure the input you're trying to spend exists.getrawmempool
andgetblock
for conflicting tx and found none. I agree mining doesn't rule out double spend, but being able to relay the tx and mine it after mining a block and a node restart does. When I dogettxout
I get strange behavior. I constructed the tx to use input 1 of a tx. I see a txout forgettxout <hash> 0 true
but not forgettxout <hash> 1 true
. When I restart bitcoind I see both outpoints 0 and 1.