diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-04-05 14:20:49 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-04-06 10:59:03 +0200 |
commit | 4f7c959af1672f9f51122867dca48ac4fa454d75 (patch) | |
tree | 3a250d3bb7b05dfaacb4758c4a9473025c63941e /src/policy/rbf.h | |
parent | a9149688f87cb790a600400abd9af72c3ee0c312 (diff) |
Refactor IsRBFOptIn, avoid exception
Diffstat (limited to 'src/policy/rbf.h')
-rw-r--r-- | src/policy/rbf.h | 8 |
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 |