Skip to content

Commit

Permalink
Convert chain to new serialization
Browse files Browse the repository at this point in the history
(Without converting CDiskBlockIndex)
  • Loading branch information
sipa authored and furszy committed Jul 3, 2021
1 parent bbfc55c commit 7376a95
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,15 @@ class CBlockFileInfo
uint64_t nTimeFirst; //!< earliest time of block in file
uint64_t nTimeLast; //!< latest time of block in file

ADD_SERIALIZE_METHODS;

template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action)
SERIALIZE_METHODS(CBlockFileInfo, obj)
{
READWRITE(VARINT(nBlocks));
READWRITE(VARINT(nSize));
READWRITE(VARINT(nUndoSize));
READWRITE(VARINT(nHeightFirst));
READWRITE(VARINT(nHeightLast));
READWRITE(VARINT(nTimeFirst));
READWRITE(VARINT(nTimeLast));
READWRITE(VARINT(obj.nBlocks));
READWRITE(VARINT(obj.nSize));
READWRITE(VARINT(obj.nUndoSize));
READWRITE(VARINT(obj.nHeightFirst));
READWRITE(VARINT(obj.nHeightLast));
READWRITE(VARINT(obj.nTimeFirst));
READWRITE(VARINT(obj.nTimeLast));
}

void SetNull()
Expand Down

0 comments on commit 7376a95

Please sign in to comment.