diff options
author | John Newbery <john@johnnewbery.com> | 2017-06-09 16:35:17 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-09-01 12:25:54 -0400 |
commit | 36b626867087e9fae6d85f926248997ebff327b7 (patch) | |
tree | ecf522bb82c52e8c9c58bcd7839d550e71684ca4 /test/functional/forknotify.py | |
parent | be2a2ab6a67beef97e3c3cf42bd5eeea6c4e55cf (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.
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 |