Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool-accept-txn.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | |||||
# Copyright (c) 2017 The Bitcoin developers | # Copyright (c) 2017 The Bitcoin developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
""" | """ | ||||
This test checks acceptance of transactions by the mempool | This test checks acceptance of transactions by the mempool | ||||
It is derived from the much more complex p2p-fullblocktest. | It is derived from the much more complex p2p-fullblocktest. | ||||
""" | """ | ||||
Show All 34 Lines | def __init__(self): | ||||
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 = start_nodes(self.num_nodes, self.options.tmpdir, | self.nodes = self.start_nodes(self.num_nodes, self.options.tmpdir, | ||||
self.extra_args, | self.extra_args, | ||||
binary=[self.options.testbinary]) | 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 |