BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
rbf.h
Go to the documentation of this file.
1 // Copyright (c) 2016-2018 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.
4 
5 #ifndef BITCOIN_POLICY_RBF_H
6 #define BITCOIN_POLICY_RBF_H
7 
8 #include <txmempool.h>
9 
10 static const uint32_t MAX_BIP125_RBF_SEQUENCE = 0xfffffffd;
11 
12 enum class RBFTransactionState {
13  UNKNOWN,
15  FINAL
16 };
17 
18 // Check whether the sequence numbers on this transaction are signaling
19 // opt-in to replace-by-fee, according to BIP 125
20 bool SignalsOptInRBF(const CTransaction &tx);
21 
22 // Determine whether an in-mempool transaction is signaling opt-in to RBF
23 // according to BIP 125
24 // This involves checking sequence numbers of the transaction, as well
25 // as the sequence numbers of all in-mempool ancestors.
27 
28 #endif // BITCOIN_POLICY_RBF_H
RBFTransactionState
Definition: rbf.h:12
bool SignalsOptInRBF(const CTransaction &tx)
Definition: rbf.cpp:7
RBFTransactionState IsRBFOptIn(const CTransaction &tx, CTxMemPool &pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
Definition: rbf.cpp:17
#define EXCLUSIVE_LOCKS_REQUIRED(...)
Definition: threadsafety.h:51
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:441
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:264