Declare various CBlockTreeDB methods as const

Ported from fb66589022
which has some methods we do not yet have.
This commit is contained in:
Duke
2023-04-05 19:24:30 -07:00
parent f3c0cb73bb
commit 98ee2a6a4f
2 changed files with 13 additions and 13 deletions

View File

@@ -93,13 +93,13 @@ private:
public:
bool WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo);
bool EraseBatchSync(const std::vector<const CBlockIndex*>& blockinfo);
bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo);
bool ReadLastBlockFile(int &nFile);
bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo) const;
bool ReadLastBlockFile(int &nFile) const;
bool WriteReindexing(bool fReindex);
bool ReadReindexing(bool &fReindex);
bool ReadReindexing(bool &fReindex) const;
bool ReadTxIndex(const uint256 &txid, CDiskTxPos &pos);
bool WriteTxIndex(const std::vector<std::pair<uint256, CDiskTxPos> > &list);
bool ReadSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value);
bool ReadSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value) const;
bool UpdateSpentIndex(const std::vector<std::pair<CSpentIndexKey, CSpentIndexValue> >&vect);
bool UpdateAddressUnspentIndex(const std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue > >&vect);
bool ReadAddressUnspentIndex(uint160 addressHash, int type,
@@ -112,9 +112,9 @@ public:
bool WriteTimestampIndex(const CTimestampIndexKey &timestampIndex);
bool ReadTimestampIndex(const unsigned int &high, const unsigned int &low, const bool fActiveOnly, std::vector<std::pair<uint256, unsigned int> > &vect);
bool WriteTimestampBlockIndex(const CTimestampBlockIndexKey &blockhashIndex, const CTimestampBlockIndexValue &logicalts);
bool ReadTimestampBlockIndex(const uint256 &hash, unsigned int &logicalTS);
bool ReadTimestampBlockIndex(const uint256 &hash, unsigned int &logicalTS) const;
bool WriteFlag(const std::string &name, bool fValue);
bool ReadFlag(const std::string &name, bool &fValue);
bool ReadFlag(const std::string &name, bool &fValue) const;
bool LoadBlockIndexGuts();
bool blockOnchainActive(const uint256 &hash);
UniValue Snapshot(int top);