aboutsummaryrefslogtreecommitdiff
path: root/src/policy/rbf.h
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-04-05 14:20:49 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2016-04-06 10:59:03 +0200
commit4f7c959af1672f9f51122867dca48ac4fa454d75 (patch)
tree3a250d3bb7b05dfaacb4758c4a9473025c63941e /src/policy/rbf.h
parenta9149688f87cb790a600400abd9af72c3ee0c312 (diff)
Refactor IsRBFOptIn, avoid exception
Diffstat (limited to 'src/policy/rbf.h')
-rw-r--r--src/policy/rbf.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/policy/rbf.h b/src/policy/rbf.h
index 925ce0d9bd..5a711dba07 100644
--- a/src/policy/rbf.h
+++ b/src/policy/rbf.h
@@ -7,6 +7,12 @@
#include "txmempool.h"
+enum RBFTransactionState {
+ RBF_TRANSACTIONSTATE_UNKNOWN,
+ RBF_TRANSACTIONSTATE_REPLACEABLE_BIP125,
+ RBF_TRANSACTIONSTATE_FINAL
+};
+
// Check whether the sequence numbers on this transaction are signaling
// opt-in to replace-by-fee, according to BIP 125
bool SignalsOptInRBF(const CTransaction &tx);
@@ -15,6 +21,6 @@ bool SignalsOptInRBF(const CTransaction &tx);
// according to BIP 125
// This involves checking sequence numbers of the transaction, as well
// as the sequence numbers of all in-mempool ancestors.
-bool IsRBFOptIn(const CTxMemPoolEntry &entry, CTxMemPool &pool);
+RBFTransactionState IsRBFOptIn(const CTransaction &tx, CTxMemPool &pool);
#endif // BITCOIN_POLICY_RBF_H