Merge #9578: Add missing mempool lock for CalculateMemPoolAncestors
[bitcoinplatinum.git] / src / policy / rbf.h
blob139aec57602c84ed4eaa87c303df073fabffea91
1 // Copyright (c) 2016 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_POLICY_RBF_H
6 #define BITCOIN_POLICY_RBF_H
8 #include "txmempool.h"
10 enum RBFTransactionState {
11 RBF_TRANSACTIONSTATE_UNKNOWN,
12 RBF_TRANSACTIONSTATE_REPLACEABLE_BIP125,
13 RBF_TRANSACTIONSTATE_FINAL
16 // Check whether the sequence numbers on this transaction are signaling
17 // opt-in to replace-by-fee, according to BIP 125
18 bool SignalsOptInRBF(const CTransaction &tx);
20 // Determine whether an in-mempool transaction is signaling opt-in to RBF
21 // according to BIP 125
22 // This involves checking sequence numbers of the transaction, as well
23 // as the sequence numbers of all in-mempool ancestors.
24 RBFTransactionState IsRBFOptIn(const CTransaction &tx, CTxMemPool &pool);
26 #endif // BITCOIN_POLICY_RBF_H