Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Lines | inline void SerializationOp(Stream &s, Operation ser_action) { | ||||
int nVersion = s.GetVersion(); | int nVersion = s.GetVersion(); | ||||
if (s.GetType() & SER_DISK) READWRITE(nVersion); | if (s.GetType() & SER_DISK) READWRITE(nVersion); | ||||
if ((s.GetType() & SER_DISK) || | if ((s.GetType() & SER_DISK) || | ||||
(nVersion >= CADDR_TIME_VERSION && !(s.GetType() & SER_GETHASH))) | (nVersion >= CADDR_TIME_VERSION && !(s.GetType() & SER_GETHASH))) | ||||
READWRITE(nTime); | READWRITE(nTime); | ||||
uint64_t nServicesInt = nServices; | uint64_t nServicesInt = nServices; | ||||
READWRITE(nServicesInt); | READWRITE(nServicesInt); | ||||
nServices = static_cast<ServiceFlags>(nServicesInt); | nServices = static_cast<ServiceFlags>(nServicesInt); | ||||
READWRITE(*static_cast<CService *>(this)); | READWRITEAS(CService, *this); | ||||
} | } | ||||
// TODO: make private (improves encapsulation) | // TODO: make private (improves encapsulation) | ||||
public: | public: | ||||
ServiceFlags nServices; | ServiceFlags nServices; | ||||
// disk and network only | // disk and network only | ||||
unsigned int nTime; | unsigned int nTime; | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |