Skip to content

Commit e06c116

Browse files
codablockUdjinM6
authored andcommitted
Actually pass extra_args to nodes in assumevalid.py (#3131)
This speeds up assumevalid.py from 22s to 7s on my machine. On travis, this should be an improvement of a few minutes. Without this, Travis actually fails due to block download timeouts.
1 parent 737ac96 commit e06c116

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/assumevalid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def setup_network(self):
6464
# Start node0. We don't start the other nodes yet since
6565
# we need to pre-mine a block with an invalid transaction
6666
# signature so we can pass in the block hash as assumevalid.
67-
self.start_node(0)
67+
self.start_node(0, extra_args=self.extra_args)
6868

6969
def send_blocks_until_disconnected(self, node):
7070
"""Keep sending blocks to the node until we're disconnected."""
@@ -169,13 +169,13 @@ def run_test(self):
169169
height += 1
170170

171171
# Start node1 and node2 with assumevalid so they accept a block with a bad signature.
172-
self.start_node(1, extra_args=["-assumevalid=" + hex(block102.sha256)])
172+
self.start_node(1, extra_args=self.extra_args + ["-assumevalid=" + hex(block102.sha256)])
173173
node1 = BaseNode() # connects to node1
174174
connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1], node1))
175175
node1.add_connection(connections[1])
176176
node1.wait_for_verack()
177177

178-
self.start_node(2, extra_args=["-assumevalid=" + hex(block102.sha256)])
178+
self.start_node(2, extra_args=self.extra_args + ["-assumevalid=" + hex(block102.sha256)])
179179
node2 = BaseNode() # connects to node2
180180
connections.append(NodeConn('127.0.0.1', p2p_port(2), self.nodes[2], node2))
181181
node2.add_connection(connections[2])

0 commit comments

Comments
 (0)