mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
Merge bitcoin/bitcoin#22796: RBF move (1/3): extract BIP125 Rule 5 into policy/rbf
f293c68be0MOVEONLY: getting mempool conflicts to policy/rbf (glozow)8d71796335[validation] quit RBF logic earlier and separate loops (glozow)badb9b11a6call SignalsOptInRBF instead of checking all inputs (glozow)e0df41d7d5[validation] default conflicting fees and size to 0 (glozow)b001b9f6deMOVEONLY: BIP125 max conflicts limit to policy/rbf.h (glozow) Pull request description: See #22675 for motivation, this is one chunk of it. It extracts some BIP125 logic into policy/rbf: - Defines a constant for specifying the maximum number of mempool entries we'd consider replacing by RBF - Calls the available `SignalsOptInRBF` function instead of manually iterating through inputs - Moves the logic for getting the list of conflicting mempool entries to a helper function - Also does a bit of preparation for future moves - moving declarations around, etc Also see #22677 for addressing the circular dependency. ACKs for top commit: jnewbery: Code review ACKf293c68be0theStack: Code-review ACKf293c68be0📔 ariard: ACKf293c68bTree-SHA512: a60370994569cfc91d4b2ad5e94542d4855a48927ae8b174880216074e4fa50d4523dd4ee36efdd6edf2bf7adb87a8beff9c3aaaf6dd323b286b287233e63790
This commit is contained in:
@@ -11,8 +11,15 @@ class CTransaction;
|
||||
|
||||
static const uint32_t MAX_BIP125_RBF_SEQUENCE = 0xfffffffd;
|
||||
|
||||
// Check whether the sequence numbers on this transaction are signaling
|
||||
// opt-in to replace-by-fee, according to BIP 125
|
||||
/** Check whether the sequence numbers on this transaction are signaling
|
||||
* opt-in to replace-by-fee, according to BIP 125.
|
||||
* Allow opt-out of transaction replacement by setting
|
||||
* nSequence > MAX_BIP125_RBF_SEQUENCE (SEQUENCE_FINAL-2) on all inputs.
|
||||
*
|
||||
* SEQUENCE_FINAL-1 is picked to still allow use of nLockTime by
|
||||
* non-replaceable transactions. All inputs rather than just one
|
||||
* is for the sake of multi-party protocols, where we don't
|
||||
* want a single party to be able to disable replacement. */
|
||||
bool SignalsOptInRBF(const CTransaction &tx);
|
||||
|
||||
#endif // BITCOIN_UTIL_RBF_H
|
||||
|
||||
Reference in New Issue
Block a user