diff --git a/test/functional/abc-mempool-accept-txn.py b/test/functional/abc-mempool-accept-txn.py --- a/test/functional/abc-mempool-accept-txn.py +++ b/test/functional/abc-mempool-accept-txn.py @@ -67,11 +67,6 @@ self.tip = None self.blocks = {} - def setup_network(self): - self.extra_args = [['-norelaypriority']] - self.add_nodes(self.num_nodes, self.extra_args) - self.start_nodes() - def add_options(self, parser): super().add_options(parser) parser.add_argument( @@ -210,7 +205,7 @@ spent_p2sh_tx = CTransaction() spent_p2sh_tx.vin.append( CTxIn(COutPoint(p2sh_tx_to_spend.sha256, 0), b'')) - spent_p2sh_tx.vout.append(CTxOut(1, output_script)) + spent_p2sh_tx.vout.append(CTxOut(1000, output_script)) # Sign the transaction using the redeem script sighash = SignatureHashForkId( redeem_script, spent_p2sh_tx, 0, SIGHASH_ALL | SIGHASH_FORKID, p2sh_tx_to_spend.vout[0].nValue) @@ -223,7 +218,7 @@ # P2SH tests # Create a p2sh transaction p2sh_tx = self.create_and_sign_transaction( - out[0].tx, out[0].n, 1, p2sh_script) + out[0].tx, out[0].n, 10000, p2sh_script) # Add the transaction to the block block(1) diff --git a/test/functional/abc-p2p-compactblocks.py b/test/functional/abc-p2p-compactblocks.py --- a/test/functional/abc-p2p-compactblocks.py +++ b/test/functional/abc-p2p-compactblocks.py @@ -91,6 +91,8 @@ self.tip = None self.blocks = {} self.excessive_block_size = 16 * ONE_MEGABYTE + # -norelaypriority is needed so that the invalidateblock at the end + # will insert free transactions back into the mempool. self.extra_args = [['-norelaypriority', '-whitelist=127.0.0.1', '-limitancestorcount=999999', @@ -330,7 +332,8 @@ assert cmpctblk_header.sha256 == b2.sha256 # In order to avoid having to resend a ton of transactions, we invalidate - # b2, which will send all its transactions in the mempool. + # b2, which will send all its transactions in the mempool. Note that this + # assumes reorgs will insert low-fee transactions back into the mempool. node.invalidateblock(node.getbestblockhash()) # Let's send a compact block and see if the node accepts it. diff --git a/test/functional/abc-replay-protection.py b/test/functional/abc-replay-protection.py --- a/test/functional/abc-replay-protection.py +++ b/test/functional/abc-replay-protection.py @@ -153,18 +153,18 @@ # Fund transaction script = CScript([public_key, OP_CHECKSIG]) txfund = create_transaction( - spend.tx, spend.n, b'', 50 * COIN, script) + spend.tx, spend.n, b'', 50 * COIN - 1000, script) txfund.rehash() # Spend transaction txspend = CTransaction() - txspend.vout.append(CTxOut(50 * COIN - 1000, CScript([OP_TRUE]))) + txspend.vout.append(CTxOut(50 * COIN - 2000, CScript([OP_TRUE]))) txspend.vin.append(CTxIn(COutPoint(txfund.sha256, 0), b'')) # Sign the transaction sighashtype = (forkvalue << 8) | SIGHASH_ALL | SIGHASH_FORKID sighash = SignatureHashForkId( - script, txspend, 0, sighashtype, 50 * COIN) + script, txspend, 0, sighashtype, 50 * COIN - 1000) sig = private_key.sign(sighash) + \ bytes(bytearray([SIGHASH_ALL | SIGHASH_FORKID])) txspend.vin[0].scriptSig = CScript([sig]) diff --git a/test/functional/abc-rpc.py b/test/functional/abc-rpc.py --- a/test/functional/abc-rpc.py +++ b/test/functional/abc-rpc.py @@ -22,8 +22,7 @@ self.num_nodes = 1 self.tip = None self.setup_clean_chain = True - self.extra_args = [['-norelaypriority', - '-whitelist=127.0.0.1']] + self.extra_args = [['-whitelist=127.0.0.1']] def check_subversion(self, pattern_str): # Check that the subversion is set as expected diff --git a/test/functional/abc-transaction-ordering.py b/test/functional/abc-transaction-ordering.py --- a/test/functional/abc-transaction-ordering.py +++ b/test/functional/abc-transaction-ordering.py @@ -47,8 +47,7 @@ self.block_heights = {} self.tip = None self.blocks = {} - self.extra_args = [['-whitelist=127.0.0.1', - '-relaypriority=0']] + self.extra_args = [['-whitelist=127.0.0.1']] def add_transactions_to_block(self, block, tx_list): [tx.rehash() for tx in tx_list]