aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-07-19 11:01:05 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-09-05 11:45:16 +0200
commitfa9ee52556f493e4a896e2570ca1a3102d777d9a (patch)
tree0b542b84dbdf9bf3515afd2838425a203c5f518f
parentfaef4fc9b4990e563022b6ab595cb02c4060c216 (diff)
doc: Add doxygen comment to IsRBFOptIn
-rw-r--r--src/policy/rbf.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/policy/rbf.h b/src/policy/rbf.h
index 463c5b61e6..f84e6e5286 100644
--- a/src/policy/rbf.h
+++ b/src/policy/rbf.h
@@ -7,16 +7,27 @@
#include <txmempool.h>
+/** The rbf state of unconfirmed transactions */
enum class RBFTransactionState {
+ /** Unconfirmed tx that does not signal rbf and is not in the mempool */
UNKNOWN,
+ /** Either this tx or a mempool ancestor signals rbf */
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
-// This involves checking sequence numbers of the transaction, as well
-// as the sequence numbers of all in-mempool ancestors.
+/**
+ * Determine whether an unconfirmed transaction is signaling opt-in to RBF
+ * according to BIP 125
+ * 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 IsRBFOptInEmptyMempool(const CTransaction& tx);