diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-07-28 19:25:26 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-02-22 15:43:02 -0400 |
commit | bdc6628683197945326cbdfea3f53ec0b7d1949f (patch) | |
tree | 242a847bbb66dde5ca29834418f1df247b6afd74 /src/interfaces | |
parent | 80f52a2267f44a9cae4440615df3ff989be1579c (diff) |
Remove use of IsRBFOptIn in wallet code
This commit does not change behavior.
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/chain.cpp | 7 | ||||
-rw-r--r-- | src/interfaces/chain.h | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index c7c2d4e91c..7cab303aad 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -6,9 +6,11 @@ #include <chain.h> #include <chainparams.h> +#include <policy/rbf.h> #include <primitives/block.h> #include <sync.h> #include <threadsafety.h> +#include <txmempool.h> #include <uint256.h> #include <util/system.h> #include <validation.h> @@ -183,6 +185,11 @@ public: LOCK(cs_main); return GuessVerificationProgress(Params().TxData(), LookupBlockIndex(block_hash)); } + RBFTransactionState isRBFOptIn(const CTransaction& tx) override + { + LOCK(::mempool.cs); + return IsRBFOptIn(tx, ::mempool); + } }; } // namespace diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 453938751d..486f1ea169 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -5,7 +5,8 @@ #ifndef BITCOIN_INTERFACES_CHAIN_H #define BITCOIN_INTERFACES_CHAIN_H -#include <optional.h> +#include <optional.h> // For Optional and nullopt +#include <policy/rbf.h> // For RBFTransactionState #include <memory> #include <stdint.h> @@ -131,6 +132,9 @@ public: //! Estimate fraction of total transactions verified if blocks up to //! the specified block hash are verified. virtual double guessVerificationProgress(const uint256& block_hash) = 0; + + //! Check if transaction is RBF opt in. + virtual RBFTransactionState isRBFOptIn(const CTransaction& tx) = 0; }; //! Interface to let node manage chain clients (wallets, or maybe tools for |