MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / SerializationOp

Method SerializationOp

src/protocol.h:339–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337
338 template <typename Stream, typename Operation>
339 inline void SerializationOp(Stream& s, Operation ser_action)
340 {
341 if (ser_action.ForRead())
342 Init();
343 int nVersion = s.GetVersion();
344 if (s.GetType() & SER_DISK)
345 READWRITE(nVersion);
346 if ((s.GetType() & SER_DISK) ||
347 (nVersion >= CADDR_TIME_VERSION && !(s.GetType() & SER_GETHASH)))
348 READWRITE(nTime);
349 uint64_t nServicesInt = nServices;
350 READWRITE(nServicesInt);
351 nServices = static_cast<ServiceFlags>(nServicesInt);
352 READWRITEAS(CService, *this);
353 }
354
355 // TODO: make private (improves encapsulation)
356public:

Callers

nothing calls this directly

Calls 3

ForReadMethod · 0.45
GetVersionMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected