Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-sync-chain.py
Show All 35 Lines | def set_test_params(self): | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
# Setting minimumchainwork makes sure we test IBD as well as post-IBD | # Setting minimumchainwork makes sure we test IBD as well as post-IBD | ||||
self.extra_args = [ | self.extra_args = [ | ||||
["-minimumchainwork={:#x}".format(202 + 2 * NUM_IBD_BLOCKS)]] | ["-minimumchainwork={:#x}".format(202 + 2 * NUM_IBD_BLOCKS)]] | ||||
def run_test(self): | def run_test(self): | ||||
node0 = self.nodes[0] | node0 = self.nodes[0] | ||||
node0conn = node0.add_p2p_connection(BaseNode()) | node0conn = node0.add_p2p_connection(BaseNode()) | ||||
node0.p2p.wait_for_verack() | |||||
tip = int(node0.getbestblockhash(), 16) | tip = int(node0.getbestblockhash(), 16) | ||||
height = node0.getblockcount() + 1 | height = node0.getblockcount() + 1 | ||||
time = node0.getblock(node0.getbestblockhash())['time'] + 1 | time = node0.getblock(node0.getbestblockhash())['time'] + 1 | ||||
blocks = [] | blocks = [] | ||||
for i in range(NUM_IBD_BLOCKS * 2): | for i in range(NUM_IBD_BLOCKS * 2): | ||||
block = create_block(tip, create_coinbase(height), time) | block = create_block(tip, create_coinbase(height), time) | ||||
Show All 22 Lines |