Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_p2p_avalanche.py
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.log.info( | self.log.info( | ||||
"Poll for a selection of blocks, but some are now invalid...") | "Poll for a selection of blocks, but some are now invalid...") | ||||
invalidated_block = node.getblockhash(76) | invalidated_block = node.getblockhash(76) | ||||
node.invalidateblock(invalidated_block) | node.invalidateblock(invalidated_block) | ||||
# We need to send the coin to a new address in order to make sure we do | # We need to send the coin to a new address in order to make sure we do | ||||
# not regenerate the same block. | # not regenerate the same block. | ||||
node.generatetoaddress( | node.generatetoaddress( | ||||
26, 'bchreg:pqv2r67sgz3qumufap3h2uuj0zfmnzuv8v7ej0fffv') | 26, 'abcreg:pqv2r67sgz3qumufap3h2uuj0zfmnzuv8vhtanlqx5') | ||||
node.reconsiderblock(invalidated_block) | node.reconsiderblock(invalidated_block) | ||||
poll_node.send_poll(various_block_hashes) | poll_node.send_poll(various_block_hashes) | ||||
assert_response([AvalancheVote(BLOCK_ACCEPTED, h) for h in various_block_hashes[:5]] + | assert_response([AvalancheVote(BLOCK_ACCEPTED, h) for h in various_block_hashes[:5]] + | ||||
[AvalancheVote(BLOCK_FORK, h) for h in various_block_hashes[-3:]]) | [AvalancheVote(BLOCK_FORK, h) for h in various_block_hashes[-3:]]) | ||||
self.log.info("Poll for unknown blocks...") | self.log.info("Poll for unknown blocks...") | ||||
various_block_hashes = [ | various_block_hashes = [ | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |