Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool-accept-txn.py
Show All 31 Lines | |||||
class FullBlockTest(ComparisonTestFramework): | class FullBlockTest(ComparisonTestFramework): | ||||
# Can either run this test as 1 node with expected answers, or two and compare them. | # Can either run this test as 1 node with expected answers, or two and compare them. | ||||
# Change the "outcome" variable from each TestInstance object to only do | # Change the "outcome" variable from each TestInstance object to only do | ||||
# the comparison. | # the comparison. | ||||
def __init__(self): | def set_test_params(self): | ||||
super().__init__() | |||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
self.setup_clean_chain = True | |||||
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() | ||||
self.tip = None | self.tip = None | ||||
self.blocks = {} | self.blocks = {} | ||||
def setup_network(self): | def setup_network(self): | ||||
self.extra_args = [['-norelaypriority']] | self.extra_args = [['-norelaypriority']] | ||||
self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, | self.add_nodes(self.num_nodes, self.extra_args) | ||||
self.extra_args, | self.start_nodes() | ||||
binary=[self.options.testbinary]) | |||||
def add_options(self, parser): | def add_options(self, parser): | ||||
super().add_options(parser) | super().add_options(parser) | ||||
parser.add_option( | parser.add_option( | ||||
"--runbarelyexpensive", dest="runbarelyexpensive", default=True) | "--runbarelyexpensive", dest="runbarelyexpensive", default=True) | ||||
def run_test(self): | def run_test(self): | ||||
self.test = TestManager(self, self.options.tmpdir) | self.test = TestManager(self, self.options.tmpdir) | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |