Skip to content

Commit 3dfc4fd

Browse files
committed
[Mempool][Sapling] Introduce CCoinsViewMemPool::GetNullifier
1 parent ef17855 commit 3dfc4fd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/txmempool.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,11 @@ bool CCoinsViewMemPool::HaveCoin(const COutPoint& outpoint) const
898898
return mempool.exists(outpoint) || base->HaveCoin(outpoint);
899899
}
900900

901+
bool CCoinsViewMemPool::GetNullifier(const uint256& nullifier) const
902+
{
903+
return mempool.nullifierExists(nullifier) || base->GetNullifier(nullifier);
904+
}
905+
901906
size_t CTxMemPool::DynamicMemoryUsage() const
902907
{
903908
LOCK(cs);

src/txmempool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ class CCoinsViewMemPool : public CCoinsViewBacked
652652
CCoinsViewMemPool(CCoinsView* baseIn, CTxMemPool& mempoolIn);
653653
bool GetCoin(const COutPoint& outpoint, Coin& coin) const;
654654
bool HaveCoin(const COutPoint& outpoint) const;
655+
bool GetNullifier(const uint256& nullifier) const;
655656
};
656657

657658
// We want to sort transactions by coin age priority

0 commit comments

Comments
 (0)