Reduce memory usage of CBlockIndex
Ported code from https://github.com/zcash/zcash/pull/6192 with various changes needed for the Hush codebase.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "coins.h"
|
||||
#include "dbwrapper.h"
|
||||
#include "chain.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@@ -91,12 +92,13 @@ private:
|
||||
CBlockTreeDB(const CBlockTreeDB&);
|
||||
void operator=(const CBlockTreeDB&);
|
||||
public:
|
||||
bool WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo);
|
||||
bool WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<CBlockIndex*>& blockinfo);
|
||||
bool EraseBatchSync(const std::vector<const CBlockIndex*>& blockinfo);
|
||||
bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo) const;
|
||||
bool ReadLastBlockFile(int &nFile) const;
|
||||
bool WriteReindexing(bool fReindex);
|
||||
bool ReadReindexing(bool &fReindex) const;
|
||||
bool ReadDiskBlockIndex(const uint256 &blockhash, CDiskBlockIndex &dbindex) const;
|
||||
bool ReadTxIndex(const uint256 &txid, CDiskTxPos &pos) const;
|
||||
bool WriteTxIndex(const std::vector<std::pair<uint256, CDiskTxPos> > &list);
|
||||
bool ReadSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value) const;
|
||||
|
||||
Reference in New Issue
Block a user