Changeset View
Changeset View
Standalone View
Standalone View
src/blockfileinfo.h
// Copyright (c) 2018 The Bitcoin developers | // Copyright (c) 2018 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_BLOCKFILEINFO_H | #ifndef BITCOIN_BLOCKFILEINFO_H | ||||
#define BITCOIN_BLOCKFILEINFO_H | #define BITCOIN_BLOCKFILEINFO_H | ||||
#include <serialize.h> | #include <serialize.h> | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <string> | #include <string> | ||||
class CBlockFileInfo { | class CBlockFileInfo { | ||||
public: | public: | ||||
//!< number of blocks stored in file | //! number of blocks stored in file | ||||
unsigned int nBlocks; | unsigned int nBlocks; | ||||
//!< number of used bytes of block file | //! number of used bytes of block file | ||||
unsigned int nSize; | unsigned int nSize; | ||||
//!< number of used bytes in the undo file | //! number of used bytes in the undo file | ||||
unsigned int nUndoSize; | unsigned int nUndoSize; | ||||
//!< lowest height of block in file | //! lowest height of block in file | ||||
unsigned int nHeightFirst; | unsigned int nHeightFirst; | ||||
//!< highest height of block in file | //! highest height of block in file | ||||
unsigned int nHeightLast; | unsigned int nHeightLast; | ||||
//!< earliest time of block in file | //! earliest time of block in file | ||||
uint64_t nTimeFirst; | uint64_t nTimeFirst; | ||||
//!< latest time of block in file | //! latest time of block in file | ||||
uint64_t nTimeLast; | uint64_t nTimeLast; | ||||
ADD_SERIALIZE_METHODS; | ADD_SERIALIZE_METHODS; | ||||
template <typename Stream, typename Operation> | template <typename Stream, typename Operation> | ||||
inline void SerializationOp(Stream &s, Operation ser_action) { | inline void SerializationOp(Stream &s, Operation ser_action) { | ||||
READWRITE(VARINT(nBlocks)); | READWRITE(VARINT(nBlocks)); | ||||
READWRITE(VARINT(nSize)); | READWRITE(VARINT(nSize)); | ||||
Show All 40 Lines |