bitcoin core – Difficulty with sendrawtransaction lacking inputs error code -25

0
31


Working with Bitcoin-qt 0.16.3 testnet

Trying to sendrawtransaction, nonetheless, obtain following error:

Lacking inputs (code -25)

From what I’ve learn, this outcomes from making an attempt to make use of outputs within the transaction which have already been spent.

I’m confused, nonetheless, as a result of I’m explicitly utilizing a transaction listed by listunspent. Would not that imply the output is unspent???

In the event you might level me to the place I’m going flawed, it will be enormously appreciated.

Here is precisely 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
  }
]

enter

createrawtransaction '[{ "txid": "8d42a2db310b794ae0d75ed9a68262081fd83817a862f87a99cd176ce8743223", "vout":2 }]' '{ "2N8kPhdhwAYYK8rFt7Fhvm3oapsMF7vqbcB":0.00003, "2MtBLx3arsHFV1cBYSo5AXmX5Pf3tfcgda3":0.0000695}'

output

0200000001233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000000ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf28700000000

enter

signrawtransaction '0200000001233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000000ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf28700000000' '[{"txid":"8d42a2db310b794ae0d75ed9a68262081fd83817a862f87a99cd176ce8743223","vout":2,"scriptPubKey":"a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf287","redeemScript": "0014436faf386d5c77c575e3372a97e268a08e3f5378",
"amount":0.0001}]'

output

{
  "hex": "02000000000101233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000017160014436faf386d5c77c575e3372a97e268a08e3f5378ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf287024830450221009274a153ee55925681d5382fecbff723e2ec12e92dafc7188565e2ee2bef092402201133ec3545333afeacda23b63917660ed62be667508dbb5a121a4ed9aa52125401210273340ff4511f6bbcf7d9f1c1fe69f66704398e54f4cde0e0ec60313476fc92ab00000000",
  "full": true
}

enter

sendrawtransaction 02000000000101233274e86c17cd997af862a81738d81f086282a6d95ed7e04a790b31dba2428d0200000017160014436faf386d5c77c575e3372a97e268a08e3f5378ffffffff02b80b00000000000017a914aa0e0ebe49d03dc1b79f91775aada9293179bb2387261b00000000000017a9140a3c45e4e27e98b6bf1171b4fe1bf689b9a3dbf287024830450221009274a153ee55925681d5382fecbff723e2ec12e92dafc7188565e2ee2bef092402201133ec3545333afeacda23b63917660ed62be667508dbb5a121a4ed9aa52125401210273340ff4511f6bbcf7d9f1c1fe69f66704398e54f4cde0e0ec60313476fc92ab00000000

output

Lacking inputs (code -25)



Supply hyperlink

Leave a reply