|
|
@ -27,6 +27,7 @@ class MinimumChainWorkTest(BitcoinTestFramework):
|
|
|
|
def set_test_params(self):
|
|
|
|
def set_test_params(self):
|
|
|
|
self.setup_clean_chain = True
|
|
|
|
self.setup_clean_chain = True
|
|
|
|
self.num_nodes = 3
|
|
|
|
self.num_nodes = 3
|
|
|
|
|
|
|
|
|
|
|
|
self.extra_args = [[], ["-minimumchainwork=0x65"], ["-minimumchainwork=0x65"]]
|
|
|
|
self.extra_args = [[], ["-minimumchainwork=0x65"], ["-minimumchainwork=0x65"]]
|
|
|
|
self.node_min_work = [0, 101, 101]
|
|
|
|
self.node_min_work = [0, 101, 101]
|
|
|
|
|
|
|
|
|
|
|
@ -74,6 +75,13 @@ class MinimumChainWorkTest(BitcoinTestFramework):
|
|
|
|
self.nodes[0].generate(1)
|
|
|
|
self.nodes[0].generate(1)
|
|
|
|
|
|
|
|
|
|
|
|
self.log.info("Verifying nodes are all synced")
|
|
|
|
self.log.info("Verifying nodes are all synced")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Because nodes in regtest are all manual connections (eg using
|
|
|
|
|
|
|
|
# addnode), node1 should not have disconnected node0. If not for that,
|
|
|
|
|
|
|
|
# we'd expect node1 to have disconnected node0 for serving an
|
|
|
|
|
|
|
|
# insufficient work chain, in which case we'd need to reconnect them to
|
|
|
|
|
|
|
|
# continue the test.
|
|
|
|
|
|
|
|
|
|
|
|
self.sync_all()
|
|
|
|
self.sync_all()
|
|
|
|
self.log.info("Blockcounts: %s", [n.getblockcount() for n in self.nodes])
|
|
|
|
self.log.info("Blockcounts: %s", [n.getblockcount() for n in self.nodes])
|
|
|
|
|
|
|
|
|
|
|
|