Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-invalid-chains.py
Show All 12 Lines | |||||
class InvalidChainsTest(BitcoinTestFramework): | class InvalidChainsTest(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.tip = None | self.tip = None | ||||
self.blocks = {} | self.blocks = {} | ||||
self.block_heights = {} | self.block_heights = {} | ||||
self.extra_args = [["-whitelist=noban@127.0.0.1"]] | self.extra_args = [[ | ||||
"-whitelist=noban@127.0.0.1", | |||||
"-automaticunparking=1", | |||||
]] | |||||
def next_block(self, number): | def next_block(self, number): | ||||
if self.tip is None: | if self.tip is None: | ||||
base_block_hash = self.genesis_hash | base_block_hash = self.genesis_hash | ||||
block_time = int(time.time()) + 1 | block_time = int(time.time()) + 1 | ||||
else: | else: | ||||
base_block_hash = self.tip.sha256 | base_block_hash = self.tip.sha256 | ||||
block_time = self.tip.nTime + 1 | block_time = self.tip.nTime + 1 | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |