Use COINBASE_MATURITY constant in functional tests.

This commit is contained in:
Kiminuo
2021-05-17 16:38:19 +02:00
parent 525448df9d
commit bfa9309ad6
45 changed files with 125 additions and 66 deletions

View File

@ -15,7 +15,11 @@ Therefore, this test is limited to the remaining protection criteria.
import time
from test_framework.blocktools import create_block, create_coinbase
from test_framework.blocktools import (
COINBASE_MATURITY,
create_block,
create_coinbase,
)
from test_framework.messages import CTransaction, FromHex, msg_pong, msg_tx
from test_framework.p2p import P2PDataStore, P2PInterface
from test_framework.test_framework import BitcoinTestFramework
@ -45,7 +49,7 @@ class P2PEvict(BitcoinTestFramework):
protected_peers = set() # peers that we expect to be protected from eviction
current_peer = -1
node = self.nodes[0]
node.generatetoaddress(101, node.get_deterministic_priv_key().address)
node.generatetoaddress(COINBASE_MATURITY + 1, node.get_deterministic_priv_key().address)
self.log.info("Create 4 peers and protect them from eviction by sending us a block")
for _ in range(4):