Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_minchainwork.py
Show All 12 Lines | |||||
While in initial block download, nodes won't relay blocks to their peers, so | While in initial block download, nodes won't relay blocks to their peers, so | ||||
test that this parameter functions as intended by verifying that block relay | test that this parameter functions as intended by verifying that block relay | ||||
only succeeds past a given node once its nMinimumChainWork has been exceeded. | only succeeds past a given node once its nMinimumChainWork has been exceeded. | ||||
""" | """ | ||||
import time | import time | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import sync_blocks, connect_nodes, assert_equal | from test_framework.util import connect_nodes, assert_equal | ||||
# 2 hashes required per regtest block (with no difficulty adjustment) | # 2 hashes required per regtest block (with no difficulty adjustment) | ||||
REGTEST_WORK_PER_BLOCK = 2 | REGTEST_WORK_PER_BLOCK = 2 | ||||
class MinimumChainWorkTest(BitcoinTestFramework): | class MinimumChainWorkTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |