Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Waqbe-0005ys-Pu for bitcoin-development@lists.sourceforge.net; Thu, 17 Apr 2014 18:00:14 +0000 X-ACL-Warn: Received: from mail-la0-f48.google.com ([209.85.215.48]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Waqbb-0003uq-Hc for bitcoin-development@lists.sourceforge.net; Thu, 17 Apr 2014 18:00:14 +0000 Received: by mail-la0-f48.google.com with SMTP id gf5so646931lab.21 for ; Thu, 17 Apr 2014 11:00:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=d6Z7OqMi36i2fc/dERUtHM7cRr5+KKNo5poIDYv5jrY=; b=RCMrqAaZ7YnA+LTXWtKNpflXDynidNjbyFZYqpCZNYE3OV6qzVsRIitIQETD4ibADG UlSW6klxymqCm2Qdt0RkKml9PnYQlhxNDIaHiACGyQPjkRE4vBZyzonatd3yZflm7iQC pwLwKUuKp9Y/if/hMOrcQ9nS38JZkR4OYjwjthiNzBeN2S+2iIpyJpnqZD0iWv8fQPLb AdRQnsNGYBSd60/MVqLy9gX89x3ISaV6LFd3oA1a+apLg07umsZXTQMXGbmKB48eZ4g3 jHVeJIizNp0/baSHl4Blfr/ZtMZn8BanLwmvIzh0egoA2F3TdHH7m+mIPwKldZVBRwA9 B6eA== X-Gm-Message-State: ALoCoQmykYENTL18HcOTj+MRjG/EBBrNSWgv+PeRnitiTyZpy2ahp90bISXYEqOvrJFiOvy00KaP MIME-Version: 1.0 X-Received: by 10.112.131.65 with SMTP id ok1mr2106693lbb.51.1397757604868; Thu, 17 Apr 2014 11:00:04 -0700 (PDT) Received: by 10.112.161.67 with HTTP; Thu, 17 Apr 2014 11:00:04 -0700 (PDT) X-Originating-IP: [173.228.17.216] In-Reply-To: <534FA237.1010501@cs.huji.ac.il> References: <534FA237.1010501@cs.huji.ac.il> Date: Thu, 17 Apr 2014 11:00:04 -0700 Message-ID: From: Matthieu Riou To: Sharon Dvir Content-Type: multipart/alternative; boundary=047d7b3439e48548d504f740cdcc X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1Waqbb-0003uq-Hc Cc: bitcoin-development@lists.sourceforge.net Subject: Re: [Bitcoin-development] question about ProcessMessage() X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 18:00:14 -0000 --047d7b3439e48548d504f740cdcc Content-Type: text/plain; charset=ISO-8859-1 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 checkonly 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 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 > --047d7b3439e48548d504f740cdcc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Github has a nice feature that lets you link to a specific= line of code:


Is it the line you're referring to? It just f= lags 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 only appli= es for peers sending an addr message that would have more than 1000 address= es, 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 =A0vAddr.size()=3D=3D1000 ? 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/s= fu/NeoTech
_______________________________________________
Bitcoin-development mailing list
Bitcoin-develo= pment@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-de= velopment

--047d7b3439e48548d504f740cdcc--