Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-sigops-mempool-mining.py
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
class MempoolLimitSigopsTest(BitcoinTestFramework): | class MempoolLimitSigopsTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
self.extra_args = [["-maxmempool=5"]] | self.extra_args = [["-maxmempool=5"]] | ||||
self.block_heights = {} | self.block_heights = {} | ||||
def skip_test_if_missing_module(self): | |||||
self.skip_if_no_wallet() | |||||
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 | ||||
return block | return block | ||||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |