Working with Bitcoin-qt 0.16.3 testnet
Attempting to sendrawtransaction
, however, receive following error:
Missing inputs (code -25)
From what I have read, this results from attempting to use outputs in the transaction that have already been spent.
I am confused, however, because I am explicitly using a transaction listed by listunspent
. Doesn't that mean the output is unspent???
If you could point me to where I am going wrong, it would be greatly appreciated.
Here's exactly my work:
listunspent
output
[
{
"txid": "8d42a2db310b794ae0d75ed9a68262081fd83817a862f87a99cd176ce8743223",
"vout": 1,
"address": "2MtBLx3arsHFV1cBYSo5AXmX5Pf3tfcgda3",
"account": "addy2",
"redeemScript": "0014436faf386d5c77c575e3372a97e268a08e3f5378",
"scriptPubKey": "a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf287",
"amount": 0.00010000,
"confirmations": 229,
"spendable": true,
"solvable": true,
"safe": true
}
]
input
createrawtransaction '[{ "txid": "8d42a2db310b794ae0d75ed9a68262081fd83817a862f87a99cd176ce8743223", "vout":2 }]' '{ "2N8kPhdhwAYYK8rFt7Fhvm3oapsMF7vqbcB":0.00003, "2MtBLx3arsHFV1cBYSo5AXmX5Pf3tfcgda3":0.0000695}'
output
0200000001233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000000ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf28700000000
input
signrawtransaction '0200000001233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000000ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf28700000000' '[{"txid":"8d42a2db310b794ae0d75ed9a68262081fd83817a862f87a99cd176ce8743223","vout":2,"scriptPubKey":"a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf287","redeemScript": "0014436faf386d5c77c575e3372a97e268a08e3f5378",
"amount":0.0001}]'
output
{
"hex": "02000000000101233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000017160014436faf386d5c77c575e3372a97e268a08e3f5378ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf287024830450221009274a153ee55925681d5382fecbff723e2ec12e92dafc7188565e2ee2bef092402201133ec3545333afeacda23b63917660ed62be667508dbb5a121a4ed9aa52125401210273340ff4511f6bbcf7d9f1c1fe69f66704398e54f4cde0e0ec60313476fc92ab00000000",
"complete": true
}
input
sendrawtransaction 02000000000101233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000017160014436faf386d5c77c575e3372a97e268a08e3f5378ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf287024830450221009274a153ee55925681d5382fecbff723e2ec12e92dafc7188565e2ee2bef092402201133ec3545333afeacda23b63917660ed62be667508dbb5a121a4ed9aa52125401210273340ff4511f6bbcf7d9f1c1fe69f66704398e54f4cde0e0ec60313476fc92ab00000000
output
Missing inputs (code -25)