mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 07:18:33 +02:00
Merge #16171: Remove -mempoolreplacement to prevent needless block prop slowness.
8053e5cdadRemove -mempoolreplacement to prevent needless block prop slowness. (Matt Corallo) Pull request description: At this point there is no reasonable excuse to disable opt-in RBF, and, unlike when this option was added, there are now significant issues created when disabling it (in the form of compact block reconstruction failures). Further, it breaks a lot of modern wallet behavior. This removes an option that is: * (a) only useful when a large portion of (other) miners enforce it as well * (b) is detrimental to everyone (income for miners, RBF notifications for others) who uses it individually otherwise * (c) is effectively unused * (d) is often confused with disabling RBF (rather than just remaining stubbornly unaware of it while the rest of the network lets it through) ACKs for commit 8053e5: practicalswift: utACK8053e5cdadpromag: Deprecation would save from unlikely rantings, still ACK8053e5c. jtimon: utACK8053e5cdadajtowns: ACK8053e5cdad-- quick code review, checked tests work MarcoFalke: ACK8053e5cdadTree-SHA512: 01aee8905b2487fc38a3a86649d422d2d2345bc60f878889ebda4b8680783e1f1a97c2000c27ef086719501be2abc2911b2039a259a5e5c04f3b24ff02b0427e
This commit is contained in:
@@ -64,7 +64,7 @@ def make_utxo(node, amount, confirmed=True, scriptPubKey=CScript([1])):
|
||||
|
||||
class ReplaceByFeeTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 2
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [
|
||||
[
|
||||
"-maxorphantx=1000",
|
||||
@@ -74,9 +74,6 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
||||
"-limitdescendantcount=200",
|
||||
"-limitdescendantsize=101",
|
||||
],
|
||||
[
|
||||
"-mempoolreplacement=0",
|
||||
],
|
||||
]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
@@ -148,16 +145,12 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
||||
|
||||
# This will raise an exception due to insufficient fee
|
||||
assert_raises_rpc_error(-26, "insufficient fee", self.nodes[0].sendrawtransaction, tx1b_hex, 0)
|
||||
# This will raise an exception due to transaction replacement being disabled
|
||||
assert_raises_rpc_error(-26, "txn-mempool-conflict", self.nodes[1].sendrawtransaction, tx1b_hex, 0)
|
||||
|
||||
# Extra 0.1 BTC fee
|
||||
tx1b = CTransaction()
|
||||
tx1b.vin = [CTxIn(tx0_outpoint, nSequence=0)]
|
||||
tx1b.vout = [CTxOut(int(0.9 * COIN), CScript([b'b' * 35]))]
|
||||
tx1b_hex = txToHex(tx1b)
|
||||
# Replacement still disabled even with "enough fee"
|
||||
assert_raises_rpc_error(-26, "txn-mempool-conflict", self.nodes[1].sendrawtransaction, tx1b_hex, 0)
|
||||
# Works when enabled
|
||||
tx1b_txid = self.nodes[0].sendrawtransaction(tx1b_hex, 0)
|
||||
|
||||
@@ -168,11 +161,6 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
||||
|
||||
assert_equal(tx1b_hex, self.nodes[0].getrawtransaction(tx1b_txid))
|
||||
|
||||
# Second node is running mempoolreplacement=0, will not replace originally-seen txn
|
||||
mempool = self.nodes[1].getrawmempool()
|
||||
assert tx1a_txid in mempool
|
||||
assert tx1b_txid not in mempool
|
||||
|
||||
def test_doublespend_chain(self):
|
||||
"""Doublespend of a long chain"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user