* [Bitcoin-development] question about ProcessMessage()
@ 2014-04-17 9:43 Sharon Dvir
2014-04-17 18:00 ` Matthieu Riou
0 siblings, 1 reply; 2+ messages in thread
From: Sharon Dvir @ 2014-04-17 9:43 UTC (permalink / raw)
To: bitcoin-development
Hi, in main.cpp, ProcessMessage(), the line:
if (vAddr.size() < 1000) that appears at about line 3290
(not sure which, as I have made changes.)
What is the purpose of this line?
vAddr.size() was already checked at about line 3240, and if it was >
1000, the function has returned.
Is pfrom->fGetAddr allowed to be true iff vAddr.size()==1000 ?
Could not find it in list archive.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bitcoin-development] question about ProcessMessage()
2014-04-17 9:43 [Bitcoin-development] question about ProcessMessage() Sharon Dvir
@ 2014-04-17 18:00 ` Matthieu Riou
0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Riou @ 2014-04-17 18:00 UTC (permalink / raw)
To: Sharon Dvir; +Cc: bitcoin-development
[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]
Github has a nice feature that lets you link to a specific line of code:
https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L3549
Is it the line you're referring to? It just flags the peer as at that point
we know we don't have more addresses to learn from it (peers send 1000
addrs). The previous
check<https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L3497>only
applies for peers sending an addr message that would have more than
1000 addresses, which is disallowed to prevent flooding. And no number is
both greater and lesser than 1000 :)
Matthieu
On Thu, Apr 17, 2014 at 2:43 AM, Sharon Dvir <sharondvir@cs.huji.ac.il>wrote:
> Hi, in main.cpp, ProcessMessage(), the line:
> if (vAddr.size() < 1000) that appears at about line 3290
> (not sure which, as I have made changes.)
> What is the purpose of this line?
> vAddr.size() was already checked at about line 3240, and if it was >
> 1000, the function has returned.
> Is pfrom->fGetAddr allowed to be true iff vAddr.size()==1000 ?
> Could not find it in list archive.
> Thanks.
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
[-- Attachment #2: Type: text/html, Size: 2423 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-17 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-17 9:43 [Bitcoin-development] question about ProcessMessage() Sharon Dvir
2014-04-17 18:00 ` Matthieu Riou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox