Message types INV
, GETDATA
, and NOTFOUND
are similar in that they all have a payload consisting of a vector of CInv data structure. But while sent INV and GETDATA messages are constructed by aggregating them, and then sending them out in batch during SendMessages, NOTFOUND is sent immediately.
This means that separate GETDATA
s (which do seem sent by some network clients) always result in separate NOTFOUND
s, a potential waste of outbound bandwidth. Improve upon this by introducing Peer state m_notfounds_to_send
, aggregating them there during GETDATA
processing, and sending the result out when it either overflows or during SendMessages.