diff options
author | Antoine Riard <dev@ariard.me> | 2022-04-27 10:25:22 -0400 |
---|---|---|
committer | Antoine Riard <dev@ariard.me> | 2022-07-06 20:57:29 -0400 |
commit | 3e27e317270fdc2dd02794fea9da016387699636 (patch) | |
tree | 4ca7453d07febd54f8dff13a8dbf61fbe7b685f0 /src/validation.cpp | |
parent | 5bc10b39abbcb77638161902ccd1225139bc7cc0 (diff) |
Introduce `mempoolfullrbf` node setting.
This new node policy setting enables to accept replaced-by-fee
transaction without inspection of the replaceability signaling
as described in BIP125 "explicit signaling".
If turns on, the node mempool accepts transaction replacement
as described in `policy/mempool-replacements.md`.
The default setting value is `false`, implying opt-in RBF
is enforced.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 6b21d33871..4c694a2c21 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -740,7 +740,10 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws) // Applications relying on first-seen mempool behavior should // check all unconfirmed ancestors; otherwise an opt-in ancestor // might be replaced, causing removal of this descendant. - if (!SignalsOptInRBF(*ptxConflicting)) { + // + // If replaceability signaling is ignored due to node setting, + // replacement is always allowed. + if (!m_pool.m_full_rbf && !SignalsOptInRBF(*ptxConflicting)) { return state.Invalid(TxValidationResult::TX_MEMPOOL_POLICY, "txn-mempool-conflict"); } |