mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-29 23:37:44 +01:00
[tests] Functional tests call self.start_node(s) and self.stop_node(s)
This commit changes the individual test scripts to call the start_node(s) and stop_node(s) methods in BitcoinTestFramework.
This commit is contained in:
@@ -108,22 +108,22 @@ class VersionBitsWarningTest(BitcoinTestFramework):
|
||||
# is cleared, and restart the node. This should move the versionbit state
|
||||
# to ACTIVE.
|
||||
self.nodes[0].generate(VB_PERIOD)
|
||||
stop_nodes(self.nodes)
|
||||
self.stop_nodes()
|
||||
# Empty out the alert file
|
||||
with open(self.alert_filename, 'w', encoding='utf8') as _:
|
||||
pass
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
|
||||
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
|
||||
|
||||
# Connecting one block should be enough to generate an error.
|
||||
self.nodes[0].generate(1)
|
||||
assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getinfo()["errors"])
|
||||
assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getmininginfo()["errors"])
|
||||
assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getnetworkinfo()["warnings"])
|
||||
stop_nodes(self.nodes)
|
||||
self.stop_nodes()
|
||||
self.test_versionbits_in_alert_file()
|
||||
|
||||
# Test framework expects the node to still be running...
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
|
||||
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
|
||||
|
||||
if __name__ == '__main__':
|
||||
VersionBitsWarningTest().main()
|
||||
|
||||
Reference in New Issue
Block a user