Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_persist.py
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.log.debug("Stop-start the nodes. Verify that node0 has the " | self.log.debug("Stop-start the nodes. Verify that node0 has the " | ||||
"transactions in its mempool and node1 does not. " | "transactions in its mempool and node1 does not. " | ||||
"Verify that node2 calculates its balance correctly " | "Verify that node2 calculates its balance correctly " | ||||
"after loading wallet transactions.") | "after loading wallet transactions.") | ||||
self.stop_nodes() | self.stop_nodes() | ||||
# Give this one a head-start, so we can be "extra-sure" that it didn't | # Give this one a head-start, so we can be "extra-sure" that it didn't | ||||
# load anything later | # load anything later | ||||
self.start_node(1) | # Also don't store the mempool, to keep the datadir clean | ||||
self.start_node(1, extra_args=["-persistmempool=0"]) | |||||
self.start_node(0) | self.start_node(0) | ||||
self.start_node(2) | self.start_node(2) | ||||
wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"], timeout=1) | wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"], timeout=1) | ||||
wait_until(lambda: self.nodes[2].getmempoolinfo()["loaded"], timeout=1) | wait_until(lambda: self.nodes[2].getmempoolinfo()["loaded"], timeout=1) | ||||
assert_equal(len(self.nodes[0].getrawmempool()), 5) | assert_equal(len(self.nodes[0].getrawmempool()), 5) | ||||
assert_equal(len(self.nodes[2].getrawmempool()), 5) | assert_equal(len(self.nodes[2].getrawmempool()), 5) | ||||
# The others have loaded their mempool. If node_1 loaded anything, we'd | # The others have loaded their mempool. If node_1 loaded anything, we'd | ||||
# probably notice by now: | # probably notice by now: | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |