Browse Source

Avoid returning many "inv" orphans

Rebased-from: 540ac4514d
0.8
Jeff Garzik 10 years ago committed by Warren Togami
parent
commit
056353a2e3
  1. 5
      src/main.cpp

5
src/main.cpp

@ -3464,6 +3464,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
// Track requests for our stuff // Track requests for our stuff
Inventory(inv.hash); Inventory(inv.hash);
if (pfrom->nSendSize > (SendBufferSize() * 2)) {
pfrom->Misbehaving(50);
return error("send buffer size() = %"PRIszu"", pfrom->nSendSize);
}
} }
} }

Loading…
Cancel
Save