wallet, mempool: propagete checkChainLimits error message to wallet#28863
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Sjors
left a comment
There was a problem hiding this comment.
Concept ACK.
It would be nice if the test can reach all four possible limit error messages, but if that's difficult to achieve it could wait for a followup.
2b4e86f to
bd5417e
Compare
Previously we always got the |
BrandonOdiwuor
left a comment
There was a problem hiding this comment.
The PR looks good, left a Nit comment
|
Thanks @Sjors |
sedited
left a comment
There was a problem hiding this comment.
ACK bd5417e47cd2452817d7de859839b63210233a5c
bd5417e to
28115d8
Compare
|
Thanks for review @TheCharlatan @furszy
|
BrandonOdiwuor
left a comment
There was a problem hiding this comment.
ACK 28115d81b2eacb15dd4835d5536a71b0b5ac835b
28115d8 to
e572a53
Compare
checkChainLimits error message to walletcheckChainLimits error message to wallet
|
Force pushed from 28115d8 to e572a53
|
src/wallet/spend.cpp
Outdated
There was a problem hiding this comment.
Just a comment: Would be nice to get #25665 merged, so we can get a move constructor here.
There was a problem hiding this comment.
Thanks @TheCharlatan that can come as a follow-up post #25665 I think?
There was a problem hiding this comment.
Indeed, or it could even be done as part of that PR. It depends on which one gets merged first.
| * to mempool. The transactions need not be direct | ||
| * ancestors/descendants of each other. | ||
| * @param[in] total_vsize Sum of virtual sizes for all transactions in package. | ||
| * @param[out] errString Populated with error reason if a limit is hit. |
There was a problem hiding this comment.
* @returns {} or the error reason if a limit is hit.There was a problem hiding this comment.
Thanks Would create a tiny follow-up to fix this, so as not to invalidate ACK's.
|
cc @glozow & @instagibbs |
|
utACK 8dec9c5 |
| * to mempool. The transactions need not be direct | ||
| * ancestors/descendants of each other. | ||
| * @param[in] total_vsize Sum of virtual sizes for all transactions in package. | ||
| * @param[out] errString Populated with error reason if a limit is hit. |
…eLimits` returns 19bb65b [doc]: add doxygen return comment for CheckPackageLimits (ismaelsadeeq) Pull request description: This PR adds a doxygen comment on `CheckPackageLimits` describing what the method returns. Fixes #28863 (comment) ACKs for top commit: Sjors: utACK 19bb65b Zero-1729: utACK 19bb65b Tree-SHA512: ccf1cc00a44d3fff60f28ad6766019a9f61b349729eab3cb02bc76b13c2e55441348a1602d806e60e4b2eabeb1f5d1ddacddf86c0bcdb78b078bb3a863b650c2
Requested in #28391 comment
The error message is static when a new transaction is created and package limit is reached.
Transaction has too long of a mempool chainWhile the
CTxMempool::CheckPackageLimitsprovide explicit information about the error message.This PR updates
CTxMempool::CheckPackageLimitsreturn type toutil::Result<void>,CheckPackageLimitsnow returns void when package limit is not hit, and returns the error string whenever package limit is hit instead of using out parametererrString.The PR updates
checkChainLimitsreturn type toutil::Result<void>.Now the wallet
CreateTransactionInternalwill have access to the package limit error string whenever its hit.Also Updated functional test to reflect the error message from
CTxMempool::CheckPackageLimitsoutput.