Skip to content
Bitcoin Roots

v29.4-roots.3 · Commit 8: [PATCH 08/30] 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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

test/functional/p2p_opportunistic_1p1c.py CHANGED
@@ -9,12 +9,10 @@ Test opportunistic 1p1c package submission logic.
9
  from decimal import Decimal
10
  import time
11
  from test_framework.mempool_util import (
12
- DEFAULT_MIN_RELAY_TX_FEE,
13
  fill_mempool,
14
  )
15
  from test_framework.messages import (
16
  CInv,
17
- COIN,
18
  CTxInWitness,
19
  MAX_BIP125_RBF_SEQUENCE,
20
  MSG_WTX,
@@ -62,18 +60,27 @@ class PackageRelayTest(BitcoinTestFramework):
62
  self.num_nodes = 1
63
  self.extra_args = [[
64
  "-datacarriersize=100000",
 
65
  "-maxmempool=5",
 
66
  ]]
67
  self.supports_cli = False
68
 
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."""
 
 
72
 
73
  self.sequence -= 1
74
- assert_greater_than(self.nodes[0].getmempoolinfo()["mempoolminfee"], Decimal(DEFAULT_MIN_RELAY_TX_FEE) / COIN)
 
75
 
76
- return wallet.create_self_transfer(fee_rate=Decimal(DEFAULT_MIN_RELAY_TX_FEE) / COIN, sequence=self.sequence, confirmed_only=True)
 
 
 
 
77
 
78
  @cleanup
79
  def test_basic_child_then_parent(self):
 
9
  from decimal import Decimal
10
  import time
11
  from test_framework.mempool_util import (
 
12
  fill_mempool,
13
  )
14
  from test_framework.messages import (
15
  CInv,
 
16
  CTxInWitness,
17
  MAX_BIP125_RBF_SEQUENCE,
18
  MSG_WTX,
 
60
  self.num_nodes = 1
61
  self.extra_args = [[
62
  "-datacarriersize=100000",
63
+ "-maxscriptsize=100000", # Permit synthetic mempool-filling data carriers.
64
  "-maxmempool=5",
65
+ "-permitbarepubkey=1", # Exercise the legacy txid == wtxid relay path.
66
  ]]
67
  self.supports_cli = False
68
 
69
  def create_tx_below_mempoolminfee(self, wallet):
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
+ """
74
 
75
  self.sequence -= 1
76
+ min_relay_fee = self.nodes[0].getnetworkinfo()["relayfee"]
77
+ assert_greater_than(self.nodes[0].getmempoolinfo()["mempoolminfee"], min_relay_fee)
78
 
79
+ return wallet.create_self_transfer(
80
+ fee_rate=min_relay_fee,
81
+ sequence=self.sequence,
82
+ confirmed_only=True,
83
+ )
84
 
85
  @cleanup
86
  def test_basic_child_then_parent(self):