Changeset View
Changeset View
Standalone View
Standalone View
src/primitives/block.h
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | public: | ||||
// memory only | // memory only | ||||
mutable bool fChecked; | mutable bool fChecked; | ||||
CBlock() { SetNull(); } | CBlock() { SetNull(); } | ||||
CBlock(const CBlockHeader &header) { | CBlock(const CBlockHeader &header) { | ||||
SetNull(); | SetNull(); | ||||
*((CBlockHeader *)this) = header; | *(static_cast<CBlockHeader *>(this)) = header; | ||||
} | } | ||||
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(*(CBlockHeader *)this); | READWRITE(*static_cast<CBlockHeader *>(this)); | ||||
READWRITE(vtx); | READWRITE(vtx); | ||||
} | } | ||||
void SetNull() { | void SetNull() { | ||||
CBlockHeader::SetNull(); | CBlockHeader::SetNull(); | ||||
vtx.clear(); | vtx.clear(); | ||||
fChecked = false; | fChecked = false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |