mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 02:11:24 +02:00
Use COINBASE_MATURITY constant in functional tests.
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user