[test] Add getblockchaininfo functional test
[bitcoinplatinum.git] / src / policy / rbf.h
blob22c73f3319340453f5f5f254e38761d66f2e70c9
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 static const uint32_t MAX_BIP125_RBF_SEQUENCE = 0xfffffffd;
12 enum RBFTransactionState {
13 RBF_TRANSACTIONSTATE_UNKNOWN,
14 RBF_TRANSACTIONSTATE_REPLACEABLE_BIP125,
15 RBF_TRANSACTIONSTATE_FINAL
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);
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.
26 RBFTransactionState IsRBFOptIn(const CTransaction &tx, CTxMemPool &pool);
28 #endif // BITCOIN_POLICY_RBF_H