Changeset View
Changeset View
Standalone View
Standalone View
src/netaddress.cpp
Show First 20 Lines • Show All 555 Lines • ▼ Show 20 Lines | if (IsIPv6()) { | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
std::vector<uint8_t> CService::GetKey() const { | std::vector<uint8_t> CService::GetKey() const { | ||||
std::vector<uint8_t> vKey; | std::vector<uint8_t> vKey; | ||||
vKey.resize(18); | vKey.resize(18); | ||||
memcpy(&vKey[0], ip, 16); | memcpy(vKey.data(), ip, 16); | ||||
vKey[16] = port / 0x100; | vKey[16] = port / 0x100; | ||||
vKey[17] = port & 0x0FF; | vKey[17] = port & 0x0FF; | ||||
return vKey; | return vKey; | ||||
} | } | ||||
std::string CService::ToStringPort() const { | std::string CService::ToStringPort() const { | ||||
return strprintf("%u", port); | return strprintf("%u", port); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |