v30.3-roots.1 · Commit 8: [PATCH 08/68] ci: restore Roots assurance on Core 30.3 interfaces
test/functional/p2p_opportunistic_1p1c.py
Before: test/functional/p2p_opportunistic_1p1c.py · After: test/functional/p2p_opportunistic_1p1c.py
File metadata
index ef4440b9ecb6013766971ca9973c46d898d0944b..cc124fa3bb50ba6db043b55158132d978e6280dd 100755
Download original patch · Release notes
Diff rows 1–32 of 32. 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
|
@@ -13,7 +13,6 @@ import time
|
|
| 13 |
from test_framework.blocktools import MAX_STANDARD_TX_WEIGHT
|
| 14 |
from test_framework.mempool_util import (
|
| 15 |
create_large_orphan,
|
| 16 |
-
DEFAULT_MIN_RELAY_TX_FEE,
|
| 17 |
fill_mempool,
|
| 18 |
)
|
| 19 |
from test_framework.messages import (
|
|
@@ -77,17 +76,22 @@ class PackageRelayTest(BitcoinTestFramework):
|
|
| 77 |
self.setup_clean_chain = True
|
| 78 |
self.num_nodes = 1
|
| 79 |
self.extra_args = [[
|
|
|
|
|
|
|
|
|
|
| 80 |
"-maxmempool=5",
|
|
|
|
| 81 |
]]
|
| 82 |
|
| 83 |
def create_tx_below_mempoolminfee(self, wallet, utxo_to_spend=None):
|
| 84 |
-
"""Create a 1-input 0.1sat/vB transaction using a confirmed UTXO. Decrement and use
|
| 85 |
self.sequence so that subsequent calls to this function result in unique transactions."""
|
| 86 |
|
| 87 |
self.sequence -= 1
|
| 88 |
-
assert_greater_than(self.nodes[0].getmempoolinfo()["mempoolminfee"], Decimal(DEFAULT_MIN_RELAY_TX_FEE) / COIN)
|
|
|
|
| 89 |
|
| 90 |
-
return wallet.create_self_transfer(fee_rate=Decimal(DEFAULT_MIN_RELAY_TX_FEE) / COIN, sequence=self.sequence, utxo_to_spend=utxo_to_spend, confirmed_only=True)
|
| 91 |
|
| 92 |
@cleanup
|
| 93 |
def test_basic_child_then_parent(self):
|
|
|
|
| 13 |
from test_framework.blocktools import MAX_STANDARD_TX_WEIGHT
|
| 14 |
from test_framework.mempool_util import (
|
| 15 |
create_large_orphan,
|
|
|
|
| 16 |
fill_mempool,
|
| 17 |
)
|
| 18 |
from test_framework.messages import (
|
|
|
|
| 76 |
self.setup_clean_chain = True
|
| 77 |
self.num_nodes = 1
|
| 78 |
self.extra_args = [[
|
| 79 |
+
"-permitbaredatacarrier=1", # Native large orphan fixtures have only an OP_RETURN output.
|
| 80 |
+
"-datacarriersize=100000",
|
| 81 |
+
"-maxscriptsize=100000", # Permit synthetic mempool-filling data carriers.
|
| 82 |
"-maxmempool=5",
|
| 83 |
+
"-permitbarepubkey=1", # Exercise the legacy txid == wtxid relay path.
|
| 84 |
]]
|
| 85 |
|
| 86 |
def create_tx_below_mempoolminfee(self, wallet, utxo_to_spend=None):
|
| 87 |
+
"""Create a 1-input transaction at the node relay fee using a confirmed UTXO. Decrement and use
|
| 88 |
self.sequence so that subsequent calls to this function result in unique transactions."""
|
| 89 |
|
| 90 |
self.sequence -= 1
|
| 91 |
+
min_relay_fee = self.nodes[0].getnetworkinfo()["relayfee"]
|
| 92 |
+
assert_greater_than(self.nodes[0].getmempoolinfo()["mempoolminfee"], min_relay_fee)
|
| 93 |
|
| 94 |
+
return wallet.create_self_transfer(fee_rate=min_relay_fee, sequence=self.sequence, utxo_to_spend=utxo_to_spend, confirmed_only=True)
|
| 95 |
|
| 96 |
@cleanup
|
| 97 |
def test_basic_child_then_parent(self):
|