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/rpc_net.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/rpc_net.py')
-rwxr-xr-x | test/functional/rpc_net.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index 9a2817a6ee..6e5ef770d1 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -11,6 +11,7 @@ from decimal import Decimal from itertools import product import time +from test_framework.blocktools import COINBASE_MATURITY from test_framework.p2p import P2PInterface import test_framework.messages from test_framework.messages import ( @@ -53,7 +54,7 @@ class NetTest(BitcoinTestFramework): self.wallet = MiniWallet(self.nodes[0]) self.wallet.generate(1) # Get out of IBD for the minfeefilter and getpeerinfo tests. - self.nodes[0].generate(101) + self.nodes[0].generate(COINBASE_MATURITY + 1) # By default, the test framework sets up an addnode connection from # node 1 --> node0. By connecting node0 --> node 1, we're left with |