Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p-acceptblock.py
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
class AcceptBlockTest(BitcoinTestFramework): | class AcceptBlockTest(BitcoinTestFramework): | ||||
def add_options(self, parser): | def add_options(self, parser): | ||||
parser.add_option("--testbinary", dest="testbinary", | parser.add_option("--testbinary", dest="testbinary", | ||||
default=os.getenv("BITCOIND", "bitcoind"), | default=os.getenv("BITCOIND", "bitcoind"), | ||||
help="bitcoind binary to test") | help="bitcoind binary to test") | ||||
def __init__(self): | def set_test_params(self): | ||||
super().__init__() | |||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
self.extra_args = [[], ["-whitelist=127.0.0.1"]] | self.extra_args = [[], ["-whitelist=127.0.0.1"]] | ||||
def setup_network(self): | def setup_network(self): | ||||
# Node0 will be used to test behavior of processing unrequested blocks | # Node0 will be used to test behavior of processing unrequested blocks | ||||
# from peers which are not whitelisted, while Node1 will be used for | # from peers which are not whitelisted, while Node1 will be used for | ||||
# the whitelisted case. | # the whitelisted case. | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |