30 if (type == protocol::mtHAVE_SET)
33 if (
auto msg =
dynamic_cast<protocol::TMLedgerData const*
>(&message))
35 if (msg->type() == protocol::liTS_CANDIDATE)
39 if (msg->type() == protocol::liTX_NODE)
43 if (msg->type() == protocol::liAS_NODE)
51 if (
auto msg =
dynamic_cast<protocol::TMGetLedger const*
>(&message))
53 if (msg->itype() == protocol::liTS_CANDIDATE)
57 if (msg->itype() == protocol::liTX_NODE)
61 if (msg->itype() == protocol::liAS_NODE)
69 if (
auto msg =
dynamic_cast<protocol::TMGetObjectByHash const*
>(&message))
71 if (msg->type() == protocol::TMGetObjectByHash::otLEDGER)
75 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION)
79 if (msg->type() == protocol::TMGetObjectByHash::otTRANSACTION_NODE)
83 if (msg->type() == protocol::TMGetObjectByHash::otSTATE_NODE)
87 if (msg->type() == protocol::TMGetObjectByHash::otCAS_OBJECT)
91 if (msg->type() == protocol::TMGetObjectByHash::otFETCH_PACK)
95 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.