32 ::google::protobuf::Message
const& message,
33 protocol::MessageType type,
39 if (type == protocol::mtHAVE_SET)
42 if (
auto msg =
dynamic_cast<protocol::TMLedgerData const*
>(&message))
44 if (msg->type() == protocol::liTS_CANDIDATE)
50 if (msg->type() == protocol::liTX_NODE)
56 if (msg->type() == protocol::liAS_NODE)
66 if (
auto msg =
dynamic_cast<protocol::TMGetLedger const*
>(&message))
68 if (msg->itype() == protocol::liTS_CANDIDATE)
74 if (msg->itype() == protocol::liTX_NODE)
80 if (msg->itype() == protocol::liAS_NODE)
90 if (
auto msg =
dynamic_cast<protocol::TMGetObjectByHash const*
>(&message))
92 if (msg->type() == protocol::TMGetObjectByHash::otLEDGER)
98 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION)
104 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION_NODE)
110 if (msg->type() == protocol::TMGetObjectByHash::otSTATE_NODE)
116 if (msg->type() == protocol::TMGetObjectByHash::otCAS_OBJECT)
122 if (msg->type() == protocol::TMGetObjectByHash::otFETCH_PACK)
128 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTIONS)
static Category categorize(::google::protobuf::Message const &message, protocol::MessageType type, bool inbound)
Given a protocol message, determine which traffic category it belongs to.