wallet: handle new error string for missing/spent input in bitcoind 0.20
The error string was updated in:
3004d5a12d
This commit is contained in:
parent
6390f167e5
commit
2bd41b9dd1
1 changed files with 5 additions and 1 deletions
|
@ -3615,8 +3615,12 @@ func (w *Wallet) publishTransaction(tx *wire.MsgTx) (*chainhash.Hash, error) {
|
|||
|
||||
// Returned by bitcoind on the RPC when broadcasting a transaction that
|
||||
// is spending either output that is missing or already spent.
|
||||
//
|
||||
// https://github.com/bitcoin/bitcoin/blob/9bf5768dd628b3a7c30dd42b5ed477a92c4d3540/src/node/transaction.cpp#L49
|
||||
case match(err, "missing inputs"):
|
||||
// https://github.com/bitcoin/bitcoin/blob/0.20/src/validation.cpp#L642
|
||||
case match(err, "missing inputs") ||
|
||||
match(err, "bad-txns-inputs-missingorspent"):
|
||||
|
||||
returnErr = &ErrDoubleSpend{
|
||||
backendError: err,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue