MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / ProcessFilterLoadMessage

Function ProcessFilterLoadMessage

src/p2p/chainmessage.cpp:778–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776}
777
778void ProcessFilterLoadMessage(CNode *pFrom, CDataStream &vRecv) {
779 CBloomFilter filter;
780 vRecv >> filter;
781
782 if (!filter.IsWithinSizeConstraints()) {
783 LogPrint(BCLog::INFO, "Misebehaving: filter is not within size constraints, Misbehavior add 100");
784 // There is no excuse for sending a too-large filter
785 Misbehaving(pFrom->GetId(), 100);
786 } else {
787 LOCK(pFrom->cs_filter);
788 delete pFrom->pFilter;
789 pFrom->pFilter = new CBloomFilter(filter);
790 pFrom->pFilter->UpdateEmptyFull();
791 }
792 pFrom->fRelayTxes = true;
793}
794
795void ProcessFilterAddMessage(CNode *pFrom, CDataStream &vRecv) {
796 vector<uint8_t> vData;

Callers 1

ProcessMessageFunction · 0.85

Calls 4

MisbehavingFunction · 0.85
GetIdMethod · 0.80
UpdateEmptyFullMethod · 0.80

Tested by

no test coverage detected