@@ -34,16 +34,16 @@ static constexpr uint8_t DB_FLAG{'F'};
34
34
static constexpr uint8_t DB_REINDEX_FLAG{' R' };
35
35
static constexpr uint8_t DB_LAST_BLOCK{' l' };
36
36
// Keys used in previous version that might still be found in the DB:
37
- // CBlockTreeDB ::DB_TXINDEX_BLOCK{'T'};
38
- // CBlockTreeDB ::DB_TXINDEX{'t'}
39
- // CBlockTreeDB ::ReadFlag("txindex")
37
+ // BlockTreeDB ::DB_TXINDEX_BLOCK{'T'};
38
+ // BlockTreeDB ::DB_TXINDEX{'t'}
39
+ // BlockTreeDB ::ReadFlag("txindex")
40
40
41
- bool CBlockTreeDB ::ReadBlockFileInfo (int nFile, CBlockFileInfo& info)
41
+ bool BlockTreeDB ::ReadBlockFileInfo (int nFile, CBlockFileInfo& info)
42
42
{
43
43
return Read (std::make_pair (DB_BLOCK_FILES, nFile), info);
44
44
}
45
45
46
- bool CBlockTreeDB ::WriteReindexing (bool fReindexing )
46
+ bool BlockTreeDB ::WriteReindexing (bool fReindexing )
47
47
{
48
48
if (fReindexing ) {
49
49
return Write (DB_REINDEX_FLAG, uint8_t {' 1' });
@@ -52,17 +52,17 @@ bool CBlockTreeDB::WriteReindexing(bool fReindexing)
52
52
}
53
53
}
54
54
55
- void CBlockTreeDB ::ReadReindexing (bool & fReindexing )
55
+ void BlockTreeDB ::ReadReindexing (bool & fReindexing )
56
56
{
57
57
fReindexing = Exists (DB_REINDEX_FLAG);
58
58
}
59
59
60
- bool CBlockTreeDB ::ReadLastBlockFile (int & nFile)
60
+ bool BlockTreeDB ::ReadLastBlockFile (int & nFile)
61
61
{
62
62
return Read (DB_LAST_BLOCK, nFile);
63
63
}
64
64
65
- bool CBlockTreeDB ::WriteBatchSync (const std::vector<std::pair<int , const CBlockFileInfo*>>& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo)
65
+ bool BlockTreeDB ::WriteBatchSync (const std::vector<std::pair<int , const CBlockFileInfo*>>& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo)
66
66
{
67
67
CDBBatch batch (*this );
68
68
for (const auto & [file, info] : fileInfo) {
@@ -75,12 +75,12 @@ bool CBlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockF
75
75
return WriteBatch (batch, true );
76
76
}
77
77
78
- bool CBlockTreeDB ::WriteFlag (const std::string& name, bool fValue )
78
+ bool BlockTreeDB ::WriteFlag (const std::string& name, bool fValue )
79
79
{
80
80
return Write (std::make_pair (DB_FLAG, name), fValue ? uint8_t {' 1' } : uint8_t {' 0' });
81
81
}
82
82
83
- bool CBlockTreeDB ::ReadFlag (const std::string& name, bool & fValue )
83
+ bool BlockTreeDB ::ReadFlag (const std::string& name, bool & fValue )
84
84
{
85
85
uint8_t ch;
86
86
if (!Read (std::make_pair (DB_FLAG, name), ch)) {
@@ -90,7 +90,7 @@ bool CBlockTreeDB::ReadFlag(const std::string& name, bool& fValue)
90
90
return true ;
91
91
}
92
92
93
- bool CBlockTreeDB ::LoadBlockIndexGuts (const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex, const util::SignalInterrupt& interrupt)
93
+ bool BlockTreeDB ::LoadBlockIndexGuts (const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex, const util::SignalInterrupt& interrupt)
94
94
{
95
95
AssertLockHeld (::cs_main);
96
96
std::unique_ptr<CDBIterator> pcursor (NewIterator ());
0 commit comments