doc: Add doxygen comment to IsRBFOptIn

This commit is contained in:
MarcoFalke 2020-07-19 11:01:05 +02:00
parent faef4fc9b4
commit fa9ee52556
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -7,16 +7,27 @@
#include <txmempool.h> #include <txmempool.h>
/** The rbf state of unconfirmed transactions */
enum class RBFTransactionState { enum class RBFTransactionState {
/** Unconfirmed tx that does not signal rbf and is not in the mempool */
UNKNOWN, UNKNOWN,
/** Either this tx or a mempool ancestor signals rbf */
REPLACEABLE_BIP125, REPLACEABLE_BIP125,
FINAL /** Neither this tx nor a mempool ancestor signals rbf */
FINAL,
}; };
// Determine whether an in-mempool transaction is signaling opt-in to RBF /**
// according to BIP 125 * Determine whether an unconfirmed transaction is signaling opt-in to RBF
// This involves checking sequence numbers of the transaction, as well * according to BIP 125
// as the sequence numbers of all in-mempool ancestors. * This involves checking sequence numbers of the transaction, as well
* as the sequence numbers of all in-mempool ancestors.
*
* @param tx The unconfirmed transaction
* @param pool The mempool, which may contain the tx
*
* @return The rbf state
*/
RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs);
RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx); RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx);