Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-sigops-deactivation.py
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
self.block_heights = {} | self.block_heights = {} | ||||
timeargs = ["-phononactivationtime={}".format( | timeargs = ["-phononactivationtime={}".format( | ||||
SIGOPS_DEACTIVATION_TIME), | SIGOPS_DEACTIVATION_TIME), | ||||
"-replayprotectionactivationtime={}".format( | "-replayprotectionactivationtime={}".format( | ||||
REPLAY_PROTECTION_START_TIME)] | REPLAY_PROTECTION_START_TIME)] | ||||
# many standardness rules are actually enforced on regtest, except for | # many standardness rules are actually enforced on regtest, except for | ||||
# P2SH sigops. | # P2SH sigops. | ||||
self.extra_args = [timeargs, timeargs + ['-acceptnonstdtxn=0']] | self.extra_args = [timeargs + ['-acceptnonstdtxn=1'], timeargs] | ||||
def getbestblock(self, node): | def getbestblock(self, node): | ||||
"""Get the best block. Register its height so we can use build_block.""" | """Get the best block. Register its height so we can use build_block.""" | ||||
block_height = node.getblockcount() | block_height = node.getblockcount() | ||||
blockhash = node.getblockhash(block_height) | blockhash = node.getblockhash(block_height) | ||||
block = FromHex(CBlock(), node.getblock(blockhash, 0)) | block = FromHex(CBlock(), node.getblock(blockhash, 0)) | ||||
block.calc_sha256() | block.calc_sha256() | ||||
self.block_heights[block.sha256] = block_height | self.block_heights[block.sha256] = block_height | ||||
▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines |