File tree Expand file tree Collapse file tree 3 files changed +9
-24
lines changed Expand file tree Collapse file tree 3 files changed +9
-24
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ static constexpr int64_t MAX_BLOCK_TIME_GAP = 90 * 60;
42
42
class CBlockFileInfo
43
43
{
44
44
public:
45
- unsigned int nBlocks; // !< number of blocks stored in file
46
- unsigned int nSize; // !< number of used bytes of block file
47
- unsigned int nUndoSize; // !< number of used bytes in the undo file
48
- unsigned int nHeightFirst; // !< lowest height of block in file
49
- unsigned int nHeightLast; // !< highest height of block in file
50
- uint64_t nTimeFirst; // !< earliest time of block in file
51
- uint64_t nTimeLast; // !< latest time of block in file
45
+ unsigned int nBlocks{} ; // !< number of blocks stored in file
46
+ unsigned int nSize{} ; // !< number of used bytes of block file
47
+ unsigned int nUndoSize{} ; // !< number of used bytes in the undo file
48
+ unsigned int nHeightFirst{} ; // !< lowest height of block in file
49
+ unsigned int nHeightLast{} ; // !< highest height of block in file
50
+ uint64_t nTimeFirst{} ; // !< earliest time of block in file
51
+ uint64_t nTimeLast{} ; // !< latest time of block in file
52
52
53
53
SERIALIZE_METHODS (CBlockFileInfo, obj)
54
54
{
@@ -61,21 +61,7 @@ class CBlockFileInfo
61
61
READWRITE (VARINT (obj.nTimeLast ));
62
62
}
63
63
64
- void SetNull ()
65
- {
66
- nBlocks = 0 ;
67
- nSize = 0 ;
68
- nUndoSize = 0 ;
69
- nHeightFirst = 0 ;
70
- nHeightLast = 0 ;
71
- nTimeFirst = 0 ;
72
- nTimeLast = 0 ;
73
- }
74
-
75
- CBlockFileInfo ()
76
- {
77
- SetNull ();
78
- }
64
+ CBlockFileInfo () {}
79
65
80
66
std::string ToString () const ;
81
67
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ void BlockManager::PruneOneBlockFile(const int fileNumber)
254
254
}
255
255
}
256
256
257
- m_blockfile_info[fileNumber]. SetNull () ;
257
+ m_blockfile_info. at (fileNumber) = CBlockFileInfo{} ;
258
258
m_dirty_fileinfo.insert (fileNumber);
259
259
}
260
260
Original file line number Diff line number Diff line change 32
32
class BlockValidationState ;
33
33
class CAutoFile ;
34
34
class CBlock ;
35
- class CBlockFileInfo ;
36
35
class CBlockUndo ;
37
36
class CChainParams ;
38
37
class Chainstate ;
You can’t perform that action at this time.
0 commit comments