Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.cpp
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | ServiceFlags GetDesirableServiceFlags(ServiceFlags services) { | ||||
} | } | ||||
return ServiceFlags(NODE_NETWORK); | return ServiceFlags(NODE_NETWORK); | ||||
} | } | ||||
void SetServiceFlagsIBDCache(bool state) { | void SetServiceFlagsIBDCache(bool state) { | ||||
g_initial_block_download_completed = state; | g_initial_block_download_completed = state; | ||||
} | } | ||||
CAddress::CAddress() : CService() { | |||||
Init(); | |||||
} | |||||
CAddress::CAddress(CService ipIn, ServiceFlags nServicesIn) : CService(ipIn) { | |||||
Init(); | |||||
nServices = nServicesIn; | |||||
} | |||||
void CAddress::Init() { | |||||
nServices = NODE_NONE; | |||||
nTime = 100000000; | |||||
} | |||||
std::string CInv::GetCommand() const { | std::string CInv::GetCommand() const { | ||||
std::string cmd; | std::string cmd; | ||||
switch (GetKind()) { | switch (GetKind()) { | ||||
case MSG_TX: | case MSG_TX: | ||||
return cmd.append(NetMsgType::TX); | return cmd.append(NetMsgType::TX); | ||||
case MSG_BLOCK: | case MSG_BLOCK: | ||||
return cmd.append(NetMsgType::BLOCK); | return cmd.append(NetMsgType::BLOCK); | ||||
case MSG_FILTERED_BLOCK: | case MSG_FILTERED_BLOCK: | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |