Added mapSerials consensus rules to prohibit double-spending.

This commit is contained in:
Sean Bowe
2016-01-08 08:37:17 -07:00
parent 03bff15fe2
commit d66877afb3
8 changed files with 224 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ public:
mutable CCriticalSection cs;
std::map<uint256, CTxMemPoolEntry> mapTx;
std::map<COutPoint, CInPoint> mapNextTx;
std::map<uint256, const CTransaction*> mapSerials;
std::map<uint256, std::pair<double, CAmount> > mapDeltas;
CTxMemPool(const CFeeRate& _minRelayFee);
@@ -176,6 +177,7 @@ protected:
public:
CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn);
bool GetSerial(const uint256 &txid) const;
bool GetCoins(const uint256 &txid, CCoins &coins) const;
bool HaveCoins(const uint256 &txid) const;
};