#include <list>
+#include "addressindex.h"
+#include "spentindex.h"
#include "amount.h"
#include "coins.h"
#include "primitives/transaction.h"
mutable CCriticalSection cs;
indexed_transaction_set mapTx;
+
+private:
+ typedef std::map<CMempoolAddressDeltaKey, CMempoolAddressDelta, CMempoolAddressDeltaKeyCompare> addressDeltaMap;
+ addressDeltaMap mapAddress;
+
+ typedef std::map<uint256, std::vector<CMempoolAddressDeltaKey> > addressDeltaMapInserted;
+ addressDeltaMapInserted mapAddressInserted;
+
+ typedef std::map<CSpentIndexKey, CSpentIndexValue, CSpentIndexKeyCompare> mapSpentIndex;
+ mapSpentIndex mapSpent;
+
+ typedef std::map<uint256, std::vector<CSpentIndexKey> > mapSpentIndexInserted;
+ mapSpentIndexInserted mapSpentInserted;
+
+public:
std::map<COutPoint, CInPoint> mapNextTx;
std::map<uint256, const CTransaction*> mapNullifiers;
std::map<uint256, std::pair<double, CAmount> > mapDeltas;
void setSanityCheck(double dFrequency = 1.0) { nCheckFrequency = dFrequency * 4294967296.0; }
bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate = true);
+ void addAddressIndex(const CTxMemPoolEntry &entry, const CCoinsViewCache &view);
+ bool getAddressIndex(std::vector<std::pair<uint160, int> > &addresses,
+ std::vector<std::pair<CMempoolAddressDeltaKey, CMempoolAddressDelta> > &results);
+ bool removeAddressIndex(const uint256 txhash);
+
+ void addSpentIndex(const CTxMemPoolEntry &entry, const CCoinsViewCache &view);
+ bool getSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value);
+ bool removeSpentIndex(const uint256 txhash);
void remove(const CTransaction &tx, std::list<CTransaction>& removed, bool fRecursive = false);
void removeWithAnchor(const uint256 &invalidRoot);
void removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags);