mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
refactor: Use fixed size ints over (un)signed ints for serialized values
Bitcoin Core already assumes that 'unsigned int' means uint32_t and 'signed int' means int32_t. See src/compat/assumptions.h. Also, any serialized integral value must be of a fixed size. So make the fixed size explicit in this documenting refactor, which does not change the behavior on any platform.
This commit is contained in:
@@ -50,13 +50,13 @@ namespace kernel {
|
||||
class CBlockFileInfo
|
||||
{
|
||||
public:
|
||||
unsigned int nBlocks{}; //!< number of blocks stored in file
|
||||
unsigned int nSize{}; //!< number of used bytes of block file
|
||||
unsigned int nUndoSize{}; //!< number of used bytes in the undo file
|
||||
unsigned int nHeightFirst{}; //!< lowest height of block in file
|
||||
unsigned int nHeightLast{}; //!< highest height of block in file
|
||||
uint64_t nTimeFirst{}; //!< earliest time of block in file
|
||||
uint64_t nTimeLast{}; //!< latest time of block in file
|
||||
uint32_t nBlocks{}; //!< number of blocks stored in file
|
||||
uint32_t nSize{}; //!< number of used bytes of block file
|
||||
uint32_t nUndoSize{}; //!< number of used bytes in the undo file
|
||||
uint32_t nHeightFirst{}; //!< lowest height of block in file
|
||||
uint32_t nHeightLast{}; //!< highest height of block in file
|
||||
uint64_t nTimeFirst{}; //!< earliest time of block in file
|
||||
uint64_t nTimeLast{}; //!< latest time of block in file
|
||||
|
||||
SERIALIZE_METHODS(CBlockFileInfo, obj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user