|
|
@ -328,15 +328,15 @@ static inline bool MayHaveUsefulAddressDB(ServiceFlags services)
|
|
|
|
/** A CService with information about it as peer */
|
|
|
|
/** A CService with information about it as peer */
|
|
|
|
class CAddress : public CService
|
|
|
|
class CAddress : public CService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static constexpr uint32_t TIME_INIT{100000000};
|
|
|
|
CAddress();
|
|
|
|
|
|
|
|
explicit CAddress(CService ipIn, ServiceFlags nServicesIn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Init();
|
|
|
|
public:
|
|
|
|
|
|
|
|
CAddress() : CService{} {};
|
|
|
|
|
|
|
|
explicit CAddress(CService ipIn, ServiceFlags nServicesIn) : CService{ipIn}, nServices{nServicesIn} {};
|
|
|
|
|
|
|
|
|
|
|
|
SERIALIZE_METHODS(CAddress, obj)
|
|
|
|
SERIALIZE_METHODS(CAddress, obj)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SER_READ(obj, obj.Init());
|
|
|
|
SER_READ(obj, obj.nTime = TIME_INIT);
|
|
|
|
int nVersion = s.GetVersion();
|
|
|
|
int nVersion = s.GetVersion();
|
|
|
|
if (s.GetType() & SER_DISK) {
|
|
|
|
if (s.GetType() & SER_DISK) {
|
|
|
|
READWRITE(nVersion);
|
|
|
|
READWRITE(nVersion);
|
|
|
@ -349,10 +349,9 @@ public:
|
|
|
|
READWRITEAS(CService, obj);
|
|
|
|
READWRITEAS(CService, obj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ServiceFlags nServices;
|
|
|
|
ServiceFlags nServices{NODE_NONE};
|
|
|
|
|
|
|
|
|
|
|
|
// disk and network only
|
|
|
|
// disk and network only
|
|
|
|
unsigned int nTime;
|
|
|
|
uint32_t nTime{TIME_INIT};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** getdata message type flags */
|
|
|
|
/** getdata message type flags */
|
|
|
|