Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-segwit-recovery.py
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | def set_test_params(self): | ||||
# that segwit spending txn are not resulting in bans, node_nonstd | # that segwit spending txn are not resulting in bans, node_nonstd | ||||
# doesn't get banned when forwarding this kind of transactions to | # doesn't get banned when forwarding this kind of transactions to | ||||
# node_std. | # node_std. | ||||
self.extra_args = [['-whitelist=127.0.0.1', | self.extra_args = [['-whitelist=127.0.0.1', | ||||
"-acceptnonstdtxn"], | "-acceptnonstdtxn"], | ||||
["-acceptnonstdtxn=0"]] | ["-acceptnonstdtxn=0"]] | ||||
def next_block(self, number): | def next_block(self, number): | ||||
if self.tip == None: | if self.tip is None: | ||||
base_block_hash = self.genesis_hash | base_block_hash = self.genesis_hash | ||||
block_time = TEST_TIME | block_time = TEST_TIME | ||||
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 | ||||
# First create the coinbase | # First create the coinbase | ||||
height = self.block_heights[base_block_hash] + 1 | height = self.block_heights[base_block_hash] + 1 | ||||
coinbase = create_coinbase(height) | coinbase = create_coinbase(height) | ||||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |