v29.4-roots.4 · Commit 8: [PATCH 08/37] ci: restore assurance and isolate Core fixtures
test/functional/p2p_opportunistic_1p1c.py
Before: test/functional/p2p_opportunistic_1p1c.py · After: test/functional/p2p_opportunistic_1p1c.py
File metadata
index def70b733a646ea691cf506c4e64c014a8237cf4..4f66fd77022aa88a2a9894e67f5478087e674a73 100755
Download original patch · Release notes
Diff rows 1–43 of 43. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
test/functional/p2p_opportunistic_1p1c.py
CHANGED
|
@@ -9,12 +9,10 @@ Test opportunistic 1p1c package submission logic.
|
|
|
9
9
|
from decimal import Decimal
|
|
10
10
|
import time
|
|
11
11
|
from test_framework.mempool_util import (
|
|
12
|
-
DEFAULT_MIN_RELAY_TX_FEE,
|
|
13
12
|
fill_mempool,
|
|
14
13
|
)
|
|
15
14
|
from test_framework.messages import (
|
|
16
15
|
CInv,
|
|
17
|
-
COIN,
|
|
18
16
|
CTxInWitness,
|
|
19
17
|
MAX_BIP125_RBF_SEQUENCE,
|
|
20
18
|
MSG_WTX,
|
|
@@ -62,18 +60,27 @@ class PackageRelayTest(BitcoinTestFramework):
|
|
|
62
60
|
self.num_nodes = 1
|
|
63
61
|
self.extra_args = [[
|
|
64
62
|
"-datacarriersize=100000",
|
|
63
|
+
"-maxscriptsize=100000", # Permit synthetic mempool-filling data carriers.
|
|
65
64
|
"-maxmempool=5",
|
|
65
|
+
"-permitbarepubkey=1", # Exercise the legacy txid == wtxid relay path.
|
|
66
66
|
]]
|
|
67
67
|
self.supports_cli = False
|
|
68
68
|
|
|
69
69
|
def create_tx_below_mempoolminfee(self, wallet):
|
|
70
|
-
"""Create a 1-input 0.1sat/vB transaction using a confirmed UTXO. Decrement and use
|
|
71
|
-
self.sequence so that subsequent calls to this function result in unique transactions."""
|
|
70
|
+
"""Create a confirmed 1-input transaction at the node's minimum relay fee.
|
|
71
|
+
|
|
72
|
+
Decrement and use self.sequence so subsequent calls create unique transactions.
|
|
73
|
+
"""
|
|
72
74
|
|
|
73
75
|
self.sequence -= 1
|
|
74
|
-
assert_greater_than(self.nodes[0].getmempoolinfo()["mempoolminfee"], Decimal(DEFAULT_MIN_RELAY_TX_FEE) / COIN)
|
|
76
|
+
min_relay_fee = self.nodes[0].getnetworkinfo()["relayfee"]
|
|
77
|
+
assert_greater_than(self.nodes[0].getmempoolinfo()["mempoolminfee"], min_relay_fee)
|
|
75
78
|
|
|
76
|
-
return wallet.create_self_transfer(fee_rate=Decimal(DEFAULT_MIN_RELAY_TX_FEE) / COIN, sequence=self.sequence, confirmed_only=True)
|
|
79
|
+
return wallet.create_self_transfer(
|
|
80
|
+
fee_rate=min_relay_fee,
|
|
81
|
+
sequence=self.sequence,
|
|
82
|
+
confirmed_only=True,
|
|
83
|
+
)
|
|
77
84
|
|
|
78
85
|
@cleanup
|
|
79
86
|
def test_basic_child_then_parent(self):
|