diff options
author | John Newbery <john@johnnewbery.com> | 2017-06-09 16:35:17 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-10-03 18:43:15 +0200 |
commit | 4d3ba18386c7a09086d06c8b640c19343ff34188 (patch) | |
tree | 93de2e0a806af1d76f8b36faf1bf3f3a5677a684 /test/functional/forknotify.py | |
parent | 11a5992c90d4cc9a3823ea08dab2c078bcbf15d2 (diff) |
[tests] TestNode: separate add_node from start_node
Separates the act of creating a TestNode object from starting the node.
The test_framework now keeps track of its list of TestNodes, and test
writers can call start_node() and stop_node() without having to update
the self.nodes list.
Github-Pull: #11121
Rebased-From: 36b626867087e9fae6d85f926248997ebff327b7
Diffstat (limited to 'test/functional/forknotify.py')
-rwxr-xr-x | test/functional/forknotify.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/test/functional/forknotify.py b/test/functional/forknotify.py index 3bcf0a6795..3a2a927098 100755 --- a/test/functional/forknotify.py +++ b/test/functional/forknotify.py @@ -7,7 +7,6 @@ import os import time from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import * class ForkNotifyTest(BitcoinTestFramework): @@ -17,18 +16,12 @@ class ForkNotifyTest(BitcoinTestFramework): self.setup_clean_chain = False def setup_network(self): - self.nodes = [] self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt") with open(self.alert_filename, 'w', encoding='utf8'): pass # Just open then close to create zero-length file - self.nodes.append(self.start_node(0, self.options.tmpdir, - ["-blockversion=2", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""])) - # Node1 mines block.version=211 blocks - self.nodes.append(self.start_node(1, self.options.tmpdir, - ["-blockversion=211"])) - connect_nodes(self.nodes[1], 0) - - self.sync_all() + self.extra_args = [["-blockversion=2", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""], + ["-blockversion=211"]] + super().setup_network() def run_test(self): # Mine 51 up-version blocks |