New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle RBF signaling publication failures in wallet #3510
Conversation
36be1b6
to
990a448
Compare
go.mod
Outdated
@@ -58,6 +58,8 @@ replace github.com/lightningnetwork/lnd/ticker => ./ticker | |||
|
|||
replace github.com/lightningnetwork/lnd/queue => ./queue | |||
|
|||
replace github.com/btcsuite/btcwallet => github.com/halseth/btcwallet v0.0.0-20190919123305-ca06abc72b9c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: remove when btcwallet PR is merged.
990a448
to
5b92c80
Compare
5b92c80
to
2b8f7f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup! Changes LGTM pending approval of the dependent btcwallet PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged pending inclusion of the dependent btcwallet PR.
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.
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.
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.
2b8f7f6
to
2e94529
Compare
|
Earlier we would not return
ErrDoubleSpend
if a transaction failed to publish because there was an existing, RBF-signaling, transaction in the mempool. This could happen in cases where we attempted to force close the channel, but a different closing transaction was already broadcasted.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