refactor: Add IsRBFOptInEmptyMempool

Co-authored-by: John Newbery <jonnynewbs@gmail.com>
This commit is contained in:
MarcoFalke
2020-07-19 11:09:59 +02:00
parent df75e9f3ee
commit fa831684e5
3 changed files with 10 additions and 2 deletions

View File

@@ -276,8 +276,9 @@ public:
}
RBFTransactionState isRBFOptIn(const CTransaction& tx) override
{
LOCK(::mempool.cs);
return IsRBFOptIn(tx, ::mempool);
if (!m_node.mempool) return IsRBFOptInEmptyMempool(tx);
LOCK(m_node.mempool->cs);
return IsRBFOptIn(tx, *m_node.mempool);
}
bool hasDescendantsInMempool(const uint256& txid) override
{