Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-checkdatasig-activation.py
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | def get_tests(self): | ||||
tx0id = node.sendrawtransaction(tx0_hex) | tx0id = node.sendrawtransaction(tx0_hex) | ||||
assert(tx0id in set(node.getrawmempool())) | assert(tx0id in set(node.getrawmempool())) | ||||
# Transactions can also be included in blocks. | # Transactions can also be included in blocks. | ||||
magneticanomalyblock = next_block(MAGNETIC_ANOMALY_START_TIME + 7) | magneticanomalyblock = next_block(MAGNETIC_ANOMALY_START_TIME + 7) | ||||
add_tx(magneticanomalyblock, tx0) | add_tx(magneticanomalyblock, tx0) | ||||
yield accepted(magneticanomalyblock) | yield accepted(magneticanomalyblock) | ||||
self.log.info("Cause a reorg that deactivate the checkdatasig opcodes") | |||||
# Invalidate the checkdatasig block, ensure tx0 gets back to the mempool. | |||||
assert(tx0id not in set(node.getrawmempool())) | |||||
node.invalidateblock(format(magneticanomalyblock.sha256, 'x')) | |||||
assert(tx0id in set(node.getrawmempool())) | |||||
node.invalidateblock(format(fork_block.sha256, 'x')) | |||||
assert(tx0id not in set(node.getrawmempool())) | |||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
CheckDataSigActivationTest().main() | CheckDataSigActivationTest().main() |