Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-segwit-recovery.py
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# submit current tip and check it was accepted | # submit current tip and check it was accepted | ||||
def accepted(node): | def accepted(node): | ||||
node.p2p.send_blocks_and_test([self.tip], node) | node.p2p.send_blocks_and_test([self.tip], node) | ||||
# submit current tip and check it was rejected (and we are banned) | # submit current tip and check it was rejected (and we are banned) | ||||
def rejected(node, reject_code, reject_reason): | def rejected(node, reject_code, reject_reason): | ||||
node.p2p.send_blocks_and_test( | node.p2p.send_blocks_and_test( | ||||
[self.tip], node, success=False, reject_code=reject_code, reject_reason=reject_reason) | [self.tip], node, success=False, reject_code=reject_code, reject_reason=reject_reason, expect_disconnect=True) | ||||
node.p2p.wait_for_disconnect() | |||||
self.reconnect_p2p() | self.reconnect_p2p() | ||||
# move the tip back to a previous block | # move the tip back to a previous block | ||||
def tip(number): | def tip(number): | ||||
self.tip = self.blocks[number] | self.tip = self.blocks[number] | ||||
# adds transactions to the block and updates state | # adds transactions to the block and updates state | ||||
def update_block(block_number, new_transactions): | def update_block(block_number, new_transactions): | ||||
▲ Show 20 Lines • Show All 130 Lines • Show Last 20 Lines |