Skip to content

Commit

Permalink
test: check_mempool_result negative feerate
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kevkevinpal committed Feb 21, 2024
1 parent 45b2a91 commit bf264e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/functional/mempool_accept.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ def run_test(self):
rawtxs=[raw_tx_in_block],
maxfeerate=1,
))
# Check negative feerate
assert_raises_rpc_error(-3, "Amount out of range", lambda: self.check_mempool_result(
result_expected=None,
rawtxs=[raw_tx_in_block],
maxfeerate=-0.01,
))
# ... 0.99 passes
self.check_mempool_result(
result_expected=[{'txid': txid_in_block, 'allowed': False, 'reject-reason': 'txn-already-known'}],
Expand Down

0 comments on commit bf264e0

Please sign in to comment.