From c77c4330c7dbec01f16641bdfd3969386c7fd0cd Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Fri, 21 Jun 2019 13:57:51 +0200 Subject: [PATCH] Send less blocks to node1 We only want to verify that assumevalid causes block 102 to be accepted even though it contains an invalid script, so there is no need to send more blocks. --- test/functional/assumevalid.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/assumevalid.py b/test/functional/assumevalid.py index 1336a702f..4049add2c 100755 --- a/test/functional/assumevalid.py +++ b/test/functional/assumevalid.py @@ -197,12 +197,12 @@ class AssumeValidTest(BitcoinTestFramework): self.send_blocks_until_disconnected(node0) self.assert_blockchain_height(self.nodes[0], 101) - # Send all blocks to node1. All blocks will be accepted. - for i in range(2202): + # Send 200 blocks to node1. All blocks, including block 102, will be accepted. + for i in range(200): node1.send_message(msg_block(self.blocks[i])) - # Syncing 2200 blocks can take a while on slow systems. Give it plenty of time to sync. + # Syncing so many blocks can take a while on slow systems. Give it plenty of time to sync. node1.sync_with_ping(120) - assert_equal(self.nodes[1].getblock(self.nodes[1].getbestblockhash())['height'], 2202) + assert_equal(self.nodes[1].getblock(self.nodes[1].getbestblockhash())['height'], 200) # Send blocks to node2. Block 102 will be rejected. self.send_blocks_until_disconnected(node2)