Handle RBF signaling publication failures in wallet#3510
Merged
Conversation
wpaulino
reviewed
Sep 16, 2019
Roasbeef
requested changes
Sep 19, 2019
36be1b6 to
990a448
Compare
halseth
commented
Sep 19, 2019
Contributor
Author
There was a problem hiding this comment.
Note to self: remove when btcwallet PR is merged.
990a448 to
5b92c80
Compare
Roasbeef
reviewed
Sep 20, 2019
5b92c80 to
2b8f7f6
Compare
Contributor
Author
wpaulino
reviewed
Sep 23, 2019
Contributor
wpaulino
left a comment
There was a problem hiding this comment.
Nice cleanup! Changes LGTM pending approval of the dependent btcwallet PR.
Roasbeef
approved these changes
Sep 24, 2019
Member
Roasbeef
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
|
wpaulino
approved these changes
Sep 25, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Earlier we would not return
ErrDoubleSpendif 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