aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/chain.cpp6
-rw-r--r--src/interfaces/chain.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index 7cab303aad..8c5921970b 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -190,6 +190,12 @@ public:
LOCK(::mempool.cs);
return IsRBFOptIn(tx, ::mempool);
}
+ bool hasDescendantsInMempool(const uint256& txid) override
+ {
+ LOCK(::mempool.cs);
+ auto it_mp = ::mempool.mapTx.find(txid);
+ return it_mp != ::mempool.mapTx.end() && it_mp->GetCountWithDescendants() > 1;
+ }
};
} // namespace
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index 486f1ea169..aa4f17a8ec 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -135,6 +135,9 @@ public:
//! Check if transaction is RBF opt in.
virtual RBFTransactionState isRBFOptIn(const CTransaction& tx) = 0;
+
+ //! Check if transaction has descendants in mempool.
+ virtual bool hasDescendantsInMempool(const uint256& txid) = 0;
};
//! Interface to let node manage chain clients (wallets, or maybe tools for