- 1F0735D2CEE2F9CA2A177AEAD4ECC7A1371D59C4375AEDB172EE99C28B02FA28E664DECEC9580A510BFCA4738D85E377FB74396FE4979B75ADBE1A3EC92B01C9
+ 8D726CC72E81BEFFF25D5872E757975C5EE538A6F51A930493FFF9B435E4458C736401907FA5D589368CB4A4862614E6FE16EA30CFD568184916733289477A1B
bitcoin/src/main.cpp
(1877 . 6)(1877 . 9)
5 return error("message getdata size() = %d", vInv.size());
6 }
7
8 // Counter of bytes sent in response to this 'getdata' command
9 unsigned int sentBytes = 0;
10
11 BOOST_FOREACH(const CInv& inv, vInv)
12 {
13 if (fShutdown)
(1891 . 6)(1894 . 17)
15 {
16 CBlock block;
17 block.ReadFromDisk((*mi).second);
18
19 // Add block's size to sentBytes, and determine if reached limit
20 sentBytes += block.GetSerializeSize(SER_NETWORK);
21 if (sentBytes >= SendBufferSize())
22 {
23 printf("getdata (block) may not transmit %u bytes\n", sentBytes);
24 pfrom->Misbehaving(20);
25 break;
26 }
27
28 // Limit not reached, so permitted to send block
29 pfrom->PushMessage("block", block);
30
31 // Trigger them to send a getblocks request for the next batch of inventory