MCPcopy Create free account
hub / github.com/LUX-Core/lux / CAddress

Class CAddress

src/protocol.h:93–128  ·  view source on GitHub ↗

A CService with information about it as peer */

Source from the content-addressed store, hash-verified

91
92/** A CService with information about it as peer */
93class CAddress : public CService
94{
95public:
96 CAddress();
97 explicit CAddress(CService ipIn, ServiceFlags nServicesIn);
98
99 void Init();
100
101 ADD_SERIALIZE_METHODS;
102
103 template <typename Stream, typename Operation>
104 inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
105 {
106 if (ser_action.ForRead())
107 Init();
108 if (nType & SER_DISK)
109 READWRITE(nVersion);
110 if ((nType & SER_DISK) ||
111 (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
112 READWRITE(nTime);
113 uint64_t nServicesInt = nServices;
114 READWRITE(nServicesInt);
115 nServices = (ServiceFlags)nServicesInt;
116 READWRITE(*(CService*)this);
117 }
118
119 // TODO: make private (improves encapsulation)
120public:
121 ServiceFlags nServices;
122
123 // disk and network only
124 unsigned int nTime;
125
126 // memory only
127 int64_t nLastTry;
128};
129
130/** getdata message types */
131const uint32_t MSG_WITNESS_FLAG = 1 << 30;

Callers 10

Select_Method · 0.70
ManageStatusMethod · 0.70
ProcessMasternodeFunction · 0.70
GetLocalAddressFunction · 0.70
PushVersionMethod · 0.70
ThreadDNSAddressSeedFunction · 0.70
StartNodeFunction · 0.70
masternodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected