Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_block_sigops.py
Show All 40 Lines | from test_framework.script import ( | ||||
SIGHASH_ALL, | SIGHASH_ALL, | ||||
SIGHASH_FORKID, | SIGHASH_FORKID, | ||||
SignatureHashForkId, | SignatureHashForkId, | ||||
) | ) | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.txtools import pad_tx | from test_framework.txtools import pad_tx | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
# Set test to run with sigops deactivation far in the future. | |||||
SIGOPS_DEACTIVATION_TIME = 2000000000 | |||||
class FullBlockSigOpsTest(BitcoinTestFramework): | class FullBlockSigOpsTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.extra_args = [['-noparkdeepreorg', '-maxreorgdepth=-1']] | self.extra_args = [['-noparkdeepreorg', '-maxreorgdepth=-1', | ||||
'-phononactivationtime={}'.format(SIGOPS_DEACTIVATION_TIME)]] | |||||
def run_test(self): | def run_test(self): | ||||
self.bootstrap_p2p() # Add one p2p connection to the node | self.bootstrap_p2p() # Add one p2p connection to the node | ||||
self.block_heights = {} | self.block_heights = {} | ||||
self.coinbase_key = CECKey() | self.coinbase_key = CECKey() | ||||
self.coinbase_key.set_secretbytes(b"horsebattery") | self.coinbase_key.set_secretbytes(b"horsebattery") | ||||
self.coinbase_pubkey = self.coinbase_key.get_pubkey() | self.coinbase_pubkey = self.coinbase_key.get_pubkey() | ||||
▲ Show 20 Lines • Show All 465 Lines • Show Last 20 Lines |