Adds test coverage in mempool_accept.py to check if a negative maxfeerate is input into check_mempool_result
Asserts "Amount out of range" error message and -3 error code
Motivated by this comment
Adds test coverage in mempool_accept.py to check if a negative maxfeerate is input into check_mempool_result
Asserts "Amount out of range" error message and -3 error code
Motivated by this comment
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | maflcko, brunoerg, davidgumberg |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
96 | @@ -97,6 +97,13 @@ def run_test(self):
97 | maxfeerate=1,
98 | ))
99 | # ... 0.99 passes
The comment is now wrongly placed
oops fixed in bf264e0
Adds test in mempool_accept to check if a negative maxfeerate is inputed
into check_mempool_result, asserts "Amount out of range" error message
and -3 error code
lgtm ACK bf264e05981e3809715f34f548138d53991db6f2
nice, utACK bf264e05981e3809715f34f548138d53991db6f2
Looks great, ACK https://github.com/bitcoin/bitcoin/pull/29459/commits/bf264e05981e3809715f34f548138d53991db6f2
If you need to rebase you could also add a check that the same error is thrown when maxfeerate exceeds MAX_MONEY:
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
CAmount AmountFromValue(const UniValue& value, int decimals)
{
// [...]
if (!MoneyRange(amount))
throw JSONRPCError(RPC_TYPE_ERROR, "Amount out of range");
// [...]
}
The same tests should probably be added for sendrawtransaction but that could be done in a follow up.