mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Remove use of GetCountWithDescendants in wallet code
This commit does not change behavior.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user