Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Handle RBF signaling publication failures in wallet #3510
Earlier we would not return
Now we'll properly now that this error is not critical, such that we can continue resolving the closing channel.
Depends on btcsuite/btcwallet#647
Needed for #3016
In preparation for extending the testPublishTransaction test, shorten it by moving utility methods out of the local scope.
We update to a new version of btcwallet where specific errors (ErrDoubleSpend and ErrReplacement) will be returned from PublishTransaction.
Checks that we get ErrDoubleSpend as expected when publishing a conflicting mempool transaction with the same fee as the existing one, and that we can publish a replacement with a higher fee successfully.
error Since btcwallet will return typed errors now, we can simplify the matching logic in order to return ErrDoubleSpend. In case a transaction cannot be published since it did not satisfy the requirements for a valid replacement, return ErrDoubleSpend to indicate it was not propagated.