diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-31 11:26:16 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-31 11:26:25 +0200 |
commit | c5ee0cc11a330a98d03cae44f37856badd947d81 (patch) | |
tree | 6a6b31e297fe8719fc11cc37214e01159503590b /test/functional/mempool_expiry.py | |
parent | d7a6bba94935a26e303e1c99eb2d4cb5f8f97f5b (diff) | |
parent | bfa9309ad606102f24c9bd3c33dfe78949f09418 (diff) | |
download | bitcoin-c5ee0cc11a330a98d03cae44f37856badd947d81.tar.xz |
Merge bitcoin/bitcoin#21989: test: Use COINBASE_MATURITY in functional tests
bfa9309ad606102f24c9bd3c33dfe78949f09418 Use COINBASE_MATURITY constant in functional tests. (Kiminuo)
525448df9dc2ab6b7e960ff138956ae3e2efdf60 Move COINBASE_MATURITY from `feature_nulldummy` test to `blocktools`. (Kiminuo)
Pull request description:
`COINBASE_MATURITY` constant was added to `feature_nulldummy` test in #21373. This PR moves the constant to `blocktools.py` file and uses the constant in more tests as suggested [here](https://github.com/bitcoin/bitcoin/pull/21373#discussion_r605418462).
Edit: Goal of this PR is to replace integer constants with `COINBASE_MATURITY` but not necessarily in *all* cases because that would mean to read and fully understand all tests. That's out of my time constraints. Any reports where `COINBASE_MATURITY` should be used are welcome though!
ACKs for top commit:
theStack:
ACK bfa9309ad606102f24c9bd3c33dfe78949f09418 🌇
Tree-SHA512: 01f04645f05a39028681f355cf3d42dd63ea3303f76d93c430e0fdce441934358a2d847a54e6068d61932f1b75e1d406f51859b057b3e4b569f7083915cb317f
Diffstat (limited to 'test/functional/mempool_expiry.py')
-rwxr-xr-x | test/functional/mempool_expiry.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/mempool_expiry.py b/test/functional/mempool_expiry.py index 4c46075ae9..7d1bfef333 100755 --- a/test/functional/mempool_expiry.py +++ b/test/functional/mempool_expiry.py @@ -12,6 +12,7 @@ definable expiry timeout via the '-mempoolexpiry=<n>' command line argument from datetime import timedelta +from test_framework.blocktools import COINBASE_MATURITY from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, @@ -36,7 +37,7 @@ class MempoolExpiryTest(BitcoinTestFramework): # Add enough mature utxos to the wallet so that all txs spend confirmed coins. self.wallet.generate(4) - node.generate(100) + node.generate(COINBASE_MATURITY) # Send a parent transaction that will expire. parent_txid = self.wallet.send_self_transfer(from_node=node)['txid'] |