Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
| Show First 20 Lines • Show All 531 Lines • ▼ Show 20 Lines | SERIALIZE_METHODS(CAddress, obj) { | ||||
| READWRITE(Using<CompactSizeFormatter<false>>(services_tmp)); | READWRITE(Using<CompactSizeFormatter<false>>(services_tmp)); | ||||
| SER_READ(obj, | SER_READ(obj, | ||||
| obj.nServices = static_cast<ServiceFlags>(services_tmp)); | obj.nServices = static_cast<ServiceFlags>(services_tmp)); | ||||
| } else { | } else { | ||||
| READWRITE(Using<CustomUintFormatter<8>>(obj.nServices)); | READWRITE(Using<CustomUintFormatter<8>>(obj.nServices)); | ||||
| } | } | ||||
| // Invoke V1/V2 serializer for CService parent object. | // Invoke V1/V2 serializer for CService parent object. | ||||
| OverrideStream<Stream> os(&s, s.GetType(), use_v2 ? ADDRV2_FORMAT : 0); | OverrideStream<Stream> os(&s, s.GetType(), use_v2 ? ADDRV2_FORMAT : 0); | ||||
| SerReadWriteMany(os, ser_action, ReadWriteAsHelper<CService>(obj)); | SerReadWriteMany(os, ser_action, AsBase<CService>(obj)); | ||||
| } | } | ||||
| //! Always included in serialization, except in the network format on | //! Always included in serialization, except in the network format on | ||||
| //! INIT_PROTO_VERSION. | //! INIT_PROTO_VERSION. | ||||
| NodeSeconds nTime{TIME_INIT}; | NodeSeconds nTime{TIME_INIT}; | ||||
| //! Serialized as uint64_t in V1, and as CompactSize in V2. | //! Serialized as uint64_t in V1, and as CompactSize in V2. | ||||
| ServiceFlags nServices{NODE_NONE}; | ServiceFlags nServices{NODE_NONE}; | ||||
| ▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines | |||||