lnwallet/btcwallet/btcwallet: adds extra double spend case
Adds an extra case to the select statement to catch an error produced by btcd. The error is meant to signal that an output was previously spent, which can appear under certain race conditions in spending/broadcasting. This caused our final itest to fail because it would not try to recraft the justice txn.
This commit is contained in:
parent
34efb380be
commit
4449038ae5
@ -427,6 +427,10 @@ func (b *BtcWallet) PublishTransaction(tx *wire.MsgTx) error {
|
|||||||
// Output was already spent.
|
// Output was already spent.
|
||||||
return lnwallet.ErrDoubleSpend
|
return lnwallet.ErrDoubleSpend
|
||||||
}
|
}
|
||||||
|
if strings.Contains(err.Error(), "already been spent") {
|
||||||
|
// Output was already spent.
|
||||||
|
return lnwallet.ErrDoubleSpend
|
||||||
|
}
|
||||||
if strings.Contains(err.Error(), "orphan transaction") {
|
if strings.Contains(err.Error(), "orphan transaction") {
|
||||||
// Transaction is spending either output that
|
// Transaction is spending either output that
|
||||||
// is missing or already spent.
|
// is missing or already spent.
|
||||||
|
Loading…
Reference in New Issue
Block a user