Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.cpp
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
bool operator<(const CInv &a, const CInv &b) { | bool operator<(const CInv &a, const CInv &b) { | ||||
return (a.type < b.type || (a.type == b.type && a.hash < b.hash)); | return (a.type < b.type || (a.type == b.type && a.hash < b.hash)); | ||||
} | } | ||||
std::string CInv::GetCommand() const { | std::string CInv::GetCommand() const { | ||||
std::string cmd; | std::string cmd; | ||||
if (type & MSG_EXT_FLAG) cmd.append("extblk-"); | |||||
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: | ||||
return cmd.append(NetMsgType::MERKLEBLOCK); | return cmd.append(NetMsgType::MERKLEBLOCK); | ||||
case MSG_CMPCT_BLOCK: | case MSG_CMPCT_BLOCK: | ||||
Show All 18 Lines |