Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-parkedchain.py
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.only_valid_tip(tip, other_tip_status="parked") | self.only_valid_tip(tip, other_tip_status="parked") | ||||
node.unparkblock(bad_tip) | node.unparkblock(bad_tip) | ||||
self.only_valid_tip(tip, other_tip_status="invalid") | self.only_valid_tip(tip, other_tip_status="invalid") | ||||
node.reconsiderblock(bad_tip) | node.reconsiderblock(bad_tip) | ||||
self.only_valid_tip(good_tip) | self.only_valid_tip(good_tip) | ||||
# First, make sure both nodes are in sync. | # First, make sure both nodes are in sync. | ||||
parking_node = self.nodes[1] | parking_node = self.nodes[1] | ||||
connect_nodes_bi(self.nodes, 0, 1) | connect_nodes_bi(self.nodes[0], self.nodes[1]) | ||||
sync_blocks(self.nodes[0:2]) | sync_blocks(self.nodes[0:2]) | ||||
assert_equal(node.getbestblockhash(), parking_node.getbestblockhash()) | assert_equal(node.getbestblockhash(), parking_node.getbestblockhash()) | ||||
# Wait for node 1 to park the chain. | # Wait for node 1 to park the chain. | ||||
def wait_for_parked_block(block): | def wait_for_parked_block(block): | ||||
def check_block(): | def check_block(): | ||||
for tip in parking_node.getchaintips(): | for tip in parking_node.getchaintips(): | ||||
Show All 35 Lines |