-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Return useful error message on ATMP failure #9016
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
Conversation
Thanks! utACK 3df625f49911d0af512dc53d3b9b4a71f3dcd754 |
// Broadcast | ||
if (!wtxNew.AcceptToMemoryPool(maxTxFee)) { | ||
if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) { | ||
// This must not fail. The transaction has already been signed and recorded. |
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.
Nit: I think you can just remove this comment, as it is outdated since at least 0.12.0
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.
Could you explain how so?
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.
The 0.12.0 release notes says "[...] limits [...] the length and size of unconfirmed transaction chains that are allowed in the mempool (generally limiting the length of unconfirmed chains to 25 transactions, with a total size of 101 KB)."
So claiming this "must not fail" is a somewhat strong claim.
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.
Oh, is "must not" being used in the descriptive sense rather than prescriptive? (I read it as "oh it better not or there is trouble)If so, we should definitely re-write this.
Also, I've encountered that specific error before so I'd agree with you.
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.
IIRC the trouble means that you end up with transactions in your wallet that may never reach the mempool or a block.
But consider my nit a µnit, it can be done in a later pull.
On second thought, I might want to pass the error up through CommitTransaction. Right now it's only logged in debug.log in all the codepaths. Or I could change the error message to direct the user to check the debug log. |
Does this require enabling any debug flags? |
Concept ACK, though I'd really prefer reporting the specific problem inline instead of directing the user at the debug log. |
@laanwj Done. This should show up during rpc test failures as well, |
Nice. |
utACK 169bdab |
169bdab Return useful error message on ATMP failure (instagibbs)
post merge re-utACK 169bdab |
169bdab Return useful error message on ATMP failure (instagibbs)
169bdab Return useful error message on ATMP failure (instagibbs)
169bdab Return useful error message on ATMP failure (instagibbs)
Currently the only message reported during RPC usage and tests is the unhelpful