-
Notifications
You must be signed in to change notification settings - Fork 725
[Wallet] Abandon tx in CommitTransaction if ATMP fails #1695
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
[Wallet] Abandon tx in CommitTransaction if ATMP fails #1695
Conversation
62cf90c to
7086794
Compare
|
Rebased after merge of #1670. Ready for review. |
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.
Concept ACK 👍 . Left a comment.
A minor code style topic would be if it's better to return CommitResult instead of pass it by reference (it would make easier back ports like #1663 that adds a new arg).
7086794 to
cecc6cc
Compare
|
Rebased and moved |
furszy
left a comment
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.
Side from the comment above, code ACK cecc6cc.
Also introduce CommitResult struct to send proper feedback to the user in case of failures.
cecc6cc to
a0de4da
Compare
furszy
left a comment
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.
ACK a0de4da
Fuzzbawls
left a comment
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.
ACK a0de4da
This is an alternative to #1664.
It takes the opposite approach.
When ATMP fails in
CommitTransaction, instead of just returning the txid (hoping that the failure is not permanent) try to directly abandon the transaction.Save the result of these operations in a new struct
CWallet::CommitResult, and use it to give a detailed feedback to the user (via log lines, JSON-RPC errors and GUI dialogs).Based on top of:
This PR also cherry-picks 5f12263 from bitcoin#6898, in order to use
FormatStateMessageoutside of main.