MCPcopy Create free account
hub / github.com/Tencent/phxpaxos / ReceiveMsgHeaderCheck

Method ReceiveMsgHeaderCheck

src/algorithm/instance.cpp:376–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376bool Instance :: ReceiveMsgHeaderCheck(const Header & oHeader, const nodeid_t iFromNodeID)
377{
378 if (m_poConfig->GetGid() == 0 || oHeader.gid() == 0)
379 {
380 return true;
381 }
382
383 if (m_poConfig->GetGid() != oHeader.gid())
384 {
385 BP->GetAlgorithmBaseBP()->HeaderGidNotSame();
386 PLGErr("Header check fail, header.gid %lu config.gid %lu, msg.from_nodeid %lu",
387 oHeader.gid(), m_poConfig->GetGid(), iFromNodeID);
388 return false;
389 }
390
391 return true;
392}
393
394void Instance :: OnReceive(const std::string & sBuffer)
395{

Callers

nothing calls this directly

Calls 1

HeaderGidNotSameMethod · 0.80

Tested by

no test coverage detected