aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-versionbits-warning.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/p2p-versionbits-warning.py')
-rwxr-xr-xtest/functional/p2p-versionbits-warning.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/functional/p2p-versionbits-warning.py b/test/functional/p2p-versionbits-warning.py
index df7e8ce5c1..f9bef2580a 100755
--- a/test/functional/p2p-versionbits-warning.py
+++ b/test/functional/p2p-versionbits-warning.py
@@ -28,8 +28,7 @@ class TestNode(NodeConnCB):
pass
class VersionBitsWarningTest(BitcoinTestFramework):
- def __init__(self):
- super().__init__()
+ def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
@@ -88,8 +87,7 @@ class VersionBitsWarningTest(BitcoinTestFramework):
self.nodes[0].generate(VB_PERIOD - VB_THRESHOLD + 1)
# Check that we're not getting any versionbit-related errors in
# get*info()
- assert(not VB_PATTERN.match(self.nodes[0].getinfo()["errors"]))
- assert(not VB_PATTERN.match(self.nodes[0].getmininginfo()["errors"]))
+ assert(not VB_PATTERN.match(self.nodes[0].getmininginfo()["warnings"]))
assert(not VB_PATTERN.match(self.nodes[0].getnetworkinfo()["warnings"]))
# 3. Now build one period of blocks with >= VB_THRESHOLD blocks signaling
@@ -100,8 +98,7 @@ class VersionBitsWarningTest(BitcoinTestFramework):
# have gotten a different alert due to more than 51/100 blocks
# being of unexpected version.
# Check that get*info() shows some kind of error.
- assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getinfo()["errors"])
- assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getmininginfo()["errors"])
+ assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getmininginfo()["warnings"])
assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getnetworkinfo()["warnings"])
# Mine a period worth of expected blocks so the generic block-version warning
@@ -112,18 +109,17 @@ class VersionBitsWarningTest(BitcoinTestFramework):
# Empty out the alert file
with open(self.alert_filename, 'w', encoding='utf8') as _:
pass
- self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
+ self.start_nodes()
# 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].getmininginfo()["warnings"])
assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getnetworkinfo()["warnings"])
self.stop_nodes()
self.test_versionbits_in_alert_file()
# Test framework expects the node to still be running...
- self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
+ self.start_nodes()
if __name__ == '__main__':
VersionBitsWarningTest().main()