Skip to content
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] ATMP failure in CommitTransaction #1664

Closed

Conversation

random-zebra
Copy link

Cherrypicks the following updates from upstream:

- backports bitcoin/bitcoin@f692fce

This resolves an issue where a wallet transaction which failed to relay
previously because it couldn't make it into the mempool will not try
gain until restart, even though mempool conditions may have changed.

Abandoned and known-conflicted transactions are skipped.

Some concern was expressed that there may be users with many unknown
conflicts would waste a lot of CPU time trying to add them to their
memory pools over and over again.  But I am doubtful these users exist
in any number, if they do exist they have worse problems, and they can
mitigate any performance issue this might have by abandoning the
transactions in question.
- backports bitcoin/bitcoin@d1734f9

CommitTransaction returns a bool to indicate success, but since commit
b3a7410 it only returns true, even if the transaction was not
successfully broadcast. This commit changes CommitTransaction() to
return void.

All dead code in `if (!CommitTransaction())` branches has been removed.
@random-zebra random-zebra added this to the 4.2.0 milestone Jun 5, 2020
@random-zebra random-zebra self-assigned this Jun 5, 2020
random-zebra added a commit that referenced this pull request Jun 27, 2020
a0de4da [Wallet] Abandon tx in CommitTransaction if ATMP fails (random-zebra)
f3e07f7 Expose FormatStateMessage (Alex Morcos)

Pull request description:

  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:
  - [x] #1670

  This PR also cherry-picks 5f12263 from bitcoin#6898, in order to use `FormatStateMessage` outside of main.

ACKs for top commit:
  furszy:
    ACK a0de4da
  Fuzzbawls:
    ACK a0de4da

Tree-SHA512: 5ae372f97eeed017002628646eee3f559af6dc488e1b24541b29f5ce763412fb569e057933468fc828a2aec3f2c17e2d818130b72d41c73524cfa90680877d23
@random-zebra
Copy link
Author

Closing for #1695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant