Skip to content

Commit c2d72ea

Browse files
committed
Fix test failures
1 parent fec7965 commit c2d72ea

File tree

5 files changed

+16
-29
lines changed

5 files changed

+16
-29
lines changed

test/functional/mempool_accept.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,18 @@ def run_test(self):
147147
self.log.info('A transaction that conflicts with an unconfirmed tx')
148148
# Send the transaction that replaces the mempool transaction and opts out of replaceability
149149
node.sendrawtransaction(hexstring=tx.serialize().hex(), maxfeerate=0)
150+
151+
# not relevant with full-rbf
152+
150153
# take original raw_tx_0
151-
tx = tx_from_hex(raw_tx_0)
152-
tx.vout[0].nValue -= int(4 * fee * COIN) # Set more fee
153-
self.check_mempool_result(
154-
result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'txn-mempool-conflict'}],
155-
rawtxs=[tx.serialize().hex()],
156-
maxfeerate=0,
157-
)
154+
#tx = tx_from_hex(raw_tx_0)
155+
#tx.vout[0].nValue -= int(4 * fee * COIN) # Set more fee
156+
#
157+
#self.check_mempool_result(
158+
# result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'txn-mempool-conflict'}],
159+
# rawtxs=[tx.serialize().hex()],
160+
# maxfeerate=0,
161+
#)
158162

159163
self.log.info('A transaction with missing inputs, that never existed')
160164
tx = tx_from_hex(raw_tx_0)
@@ -316,13 +320,6 @@ def run_test(self):
316320
result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'dust'}],
317321
rawtxs=[tx.serialize().hex()],
318322
)
319-
tx = tx_from_hex(raw_tx_reference)
320-
tx.vout[0].scriptPubKey = CScript([OP_RETURN, b'\xff'])
321-
tx.vout = [tx.vout[0]] * 2
322-
self.check_mempool_result(
323-
result_expected=[{'txid': tx.rehash(), 'allowed': False, 'reject-reason': 'multi-op-return'}],
324-
rawtxs=[tx.serialize().hex()],
325-
)
326323

327324
self.log.info('A timelocked transaction')
328325
tx = tx_from_hex(raw_tx_reference)

test/functional/mempool_datacarrier.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,6 @@ def run_test(self):
5757
self.log.info("Testing null data transaction with default -datacarrier and -datacarriersize values.")
5858
self.test_null_data_transaction(node=self.nodes[0], data=default_size_data, success=True)
5959

60-
self.log.info("Testing a null data transaction larger than allowed by the default -datacarriersize value.")
61-
self.test_null_data_transaction(node=self.nodes[0], data=too_long_data, success=False)
62-
63-
self.log.info("Testing a null data transaction with -datacarrier=false.")
64-
self.test_null_data_transaction(node=self.nodes[1], data=default_size_data, success=False)
65-
66-
self.log.info("Testing a null data transaction with a size larger than accepted by -datacarriersize.")
67-
self.test_null_data_transaction(node=self.nodes[2], data=default_size_data, success=False)
68-
69-
self.log.info("Testing a null data transaction with a size smaller than accepted by -datacarriersize.")
70-
self.test_null_data_transaction(node=self.nodes[2], data=small_data, success=True)
71-
7260
self.log.info("Testing a null data transaction with no data.")
7361
self.test_null_data_transaction(node=self.nodes[0], data=None, success=True)
7462
self.test_null_data_transaction(node=self.nodes[1], data=None, success=False)

test/functional/p2p_node_network_limited.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
and that it responds to getdata requests for blocks correctly:
99
- send a block within 288 + 2 of the tip
1010
- disconnect peers who request blocks older than that."""
11-
from test_framework.messages import CInv, MSG_BLOCK, msg_getdata, msg_verack, NODE_NETWORK_LIMITED, NODE_WITNESS
11+
from test_framework.messages import CInv, MSG_BLOCK, msg_getdata, msg_verack, NODE_NETWORK_LIMITED, NODE_WITNESS, NODE_FULL_RBF, NODE_LIBRE
1212
from test_framework.p2p import P2PInterface
1313
from test_framework.test_framework import BitcoinTestFramework
1414
from test_framework.util import (
@@ -49,7 +49,7 @@ def setup_network(self):
4949
def run_test(self):
5050
node = self.nodes[0].add_p2p_connection(P2PIgnoreInv())
5151

52-
expected_services = NODE_WITNESS | NODE_NETWORK_LIMITED
52+
expected_services = NODE_WITNESS | NODE_NETWORK_LIMITED | NODE_FULL_RBF | NODE_LIBRE
5353

5454
self.log.info("Check that node has signalled expected services.")
5555
assert_equal(node.nServices, expected_services)

test/functional/p2p_permissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def check_tx_relay(self):
119119
[tx],
120120
self.nodes[1],
121121
success=False,
122-
reject_reason='{} (wtxid={}) from peer=0 was not accepted: txn-mempool-conflict'.format(txid, tx.getwtxid())
122+
reject_reason='{} (wtxid={}) from peer=0 was not accepted: insufficient fee, rejecting replacement'.format(txid, tx.getwtxid())
123123
)
124124

125125
p2p_rebroadcast_wallet.send_txs_and_test(

test/functional/test_framework/messages.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
NODE_COMPACT_FILTERS = (1 << 6)
5454
NODE_NETWORK_LIMITED = (1 << 10)
5555
NODE_P2P_V2 = (1 << 11)
56+
NODE_FULL_RBF = (1 << 26)
57+
NODE_LIBRE = (1 << 29)
5658

5759
MSG_TX = 1
5860
MSG_BLOCK = 2

0 commit comments

Comments
 (0)