Add sapling nullifier set
This commit is contained in:
@@ -131,6 +131,11 @@ private:
|
||||
uint64_t totalTxSize = 0; //! sum of all mempool tx' byte sizes
|
||||
uint64_t cachedInnerUsage; //! sum of dynamic memory usage of all the map elements (NOT the maps themselves)
|
||||
|
||||
std::map<uint256, const CTransaction*> mapNullifiers;
|
||||
std::map<uint256, const CTransaction*> mapSaplingNullifiers;
|
||||
|
||||
void checkNullifiers(bool isSapling) const;
|
||||
|
||||
public:
|
||||
typedef boost::multi_index_container<
|
||||
CTxMemPoolEntry,
|
||||
@@ -148,9 +153,8 @@ public:
|
||||
mutable CCriticalSection cs;
|
||||
indexed_transaction_set mapTx;
|
||||
std::map<COutPoint, CInPoint> mapNextTx;
|
||||
std::map<uint256, const CTransaction*> mapNullifiers;
|
||||
std::map<uint256, std::pair<double, CAmount> > mapDeltas;
|
||||
|
||||
|
||||
CTxMemPool(const CFeeRate& _minRelayFee);
|
||||
~CTxMemPool();
|
||||
|
||||
@@ -188,6 +192,8 @@ public:
|
||||
void ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta);
|
||||
void ClearPrioritisation(const uint256 hash);
|
||||
|
||||
bool nullifierExists(const uint256& nullifier, bool isSapling) const;
|
||||
|
||||
unsigned long size()
|
||||
{
|
||||
LOCK(cs);
|
||||
@@ -237,7 +243,7 @@ protected:
|
||||
|
||||
public:
|
||||
CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn);
|
||||
bool GetNullifier(const uint256 &txid) const;
|
||||
bool GetNullifier(const uint256 &txid, bool isSapling) const;
|
||||
bool GetCoins(const uint256 &txid, CCoins &coins) const;
|
||||
bool HaveCoins(const uint256 &txid) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user