summaryrefslogtreecommitdiff
path: root/1c/fa6b0a4365f506f2d6d411a90150017d985078
blob: 18e4dcfedea022182cf359948094848bdd94889b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Return-Path: <d@domob.eu>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 8667A267
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 13 Oct 2015 11:02:39 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from mail.domob.eu (mail.domob.eu [92.222.9.28])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9E86A159
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 13 Oct 2015 11:02:38 +0000 (UTC)
Received: from [0.0.0.0] (vps149390.ovh.net [127.0.0.1])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by mail.domob.eu (Postfix) with ESMTPSA id 19F3922D8
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 13 Oct 2015 13:02:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=domob.eu; s=default;
	t=1444734155; bh=xMNl7V+ozx9CmHL10hhNIaqijx2P9x6j7kV/Rn9HCGk=;
	h=Date:From:To:Subject:From;
	b=ChgrAdrGBRyNJQdKbkoxw42qzDtlGS9YrOjGczVKxs+ebBnWqaRK+7YfnlHXFbMmu
	XC97RnCBEoWuptDckltLXfXEXRFRsm1+SDAkoRZO21oC97o+OkdoN9k5fFH9pzNy7c
	WQHtjLKtMYMdPEHD7muqegHaaubMCcMyo9HvBwey4t5wGIT2g9AdnhHj12bfYd32sz
	uLSomLhdT2WreD5SnYzmKnQWTemay/E4U5BzQe/yPK6rG9T87inLnbRPruxar41kg4
	IPqWqs5Kg/UGosbLSSodJ1vL8ZQ8SWU/3ZoDR0Q4LMhrrKSIlkfd2Y6cSOIREh7vz2
	4gw9mt4uubqoXIIH68X3CLLgKX6MwUU1o2B+ME0nuSZffncX8jUYzytAGvUXXJJ/rH
	GmmWQHifRwzGbSk4ryQIzYSxoasIIQO8N+nei3uAAjH5sF7SHsUvCIHgf6W8ALSO8P
	WEB5ul/NUhPONWzP7A46JkuOhampF7RBgoaJiZZomrXm8fBiawW73G3XcAzSrpMGJo
	4/OGILXmvnp58WiWD9WDK5J8HkBo6WFMTPsht0LhBWgHiKJlWIGzU5N5KZIenKGT8Z
	6rbL6miuPDIutFCOvD+s5iQ7kOesQmD4oWMmPLP1nb1FaW2qfKewsU6nxaEPqooOw6
	0F6nuiTaRuFVJ1DHkQ7KGXrw=
Message-ID: <561CE4C8.3000501@domob.eu>
Date: Tue, 13 Oct 2015 13:02:32 +0200
From: Daniel Kraft <d@domob.eu>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:31.0) Gecko/20100101 Icedove/31.8.0
MIME-Version: 1.0
To: bitcoin-dev@lists.linuxfoundation.org
OpenPGP: id=A7330737
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature";
	boundary="OefWMx2rntXTg5wHF9eu5ePwehkl5nhHD"
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: [bitcoin-dev] Initial getheaders request
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Oct 2015 11:02:39 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--OefWMx2rntXTg5wHF9eu5ePwehkl5nhHD
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi!

I've stumbled upon the code that does the initial "getheaders" request,
i. e., around line 4960 of src/main.cpp [1].

  [1] https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L4960

For some reason, it uses not pindexBestHeader but the *preceding* block
pindexBestHeader->pprev as the "from argument".  In contrast, the
request on line 4132 [2] (which is done in response to a newly announced
block) *does* use pindexBestHeader.

  [2] https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L4132

I see no apparent reason for using the preceding call; but if I change
it to pindexBestHeader on line 4960 as well, the wallet.py test seems to
get stuck.  I've not been able to figure out from the logs and the code
why this is the case; can anyone help me?  I think this is something
that should really be explained in a comment around line 4960.  If
someone can make me understand, I can write a pull request for that -- I
guess this will save others some time wondering like I do at the moment.

Yours,
Daniel

--=20
http://www.domob.eu/
OpenPGP: 1142 850E 6DFF 65BA 63D6  88A8 B249 2AC4 A733 0737
Namecoin: id/domob -> https://nameid.org/?name=3Ddomob
--
Done:  Arc-Bar-Cav-Hea-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Mon-Pri


--OefWMx2rntXTg5wHF9eu5ePwehkl5nhHD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJWHOTMAAoJEFcvuTrTyRk7dHcP/0nrT+pV7YDVaVSUhaJZc4Ag
wwSsDVQECkh4urpZ54P8FmDF9fY8zJBQu9Qe0vT7t+oTb1wf1hVjEOWbGxNeCd6L
HcWxYrIVK1AQL5MqfAqLP4VX+Q1UgClmVXiQo+0eobs3Dv07pfH2DQSCnxBM+Umd
xl4JrCdJXsFG2O4UMc0VgEBA6cmbAXfR/9iVK8JDsQkmBFKtwV50WlsdCxp4Iadg
0V4luzKXLKlk/t5oVjLe4yxHSe2jkDuOAnsvdFaa18Vzxyua607A/+/GBD8OWQQ8
fbQP2AFNRIiDmJKTJYJLyimXPkzq/eO+Yq+mYne1IXiiF/imyCEaKBTiwe1xCVAO
2tdolFHtKtzaTY5NN1VSbPma2hMKhDEiviI/dTu1GJ5PR09W57H0Suiri556LA8Y
7YVdmQLpknqongLjtxPvttKf2RyzfbaITdADiX9R6tTlY63bFvqZsWbb91FCaEBw
QYFsqQqDvmpOaDwHfdDfSw28hmIGu4g7KAkq+itkAyw6tHcymcxJFPOZU98yyfE3
hqDYTJ7vuT4oI0ubnpUh50tL8CSz6aGKy/jEOpgHSmWXAfeeluINu8YuZAvgU8MY
tgEs0MFjrn4kQzEjeMvhBmIeGqczs6K9vssIsKcBupYff0LYeuzjUoItFKGTsuwW
JaifYSfBA+jGUF6wr6/1
=8bhy
-----END PGP SIGNATURE-----

--OefWMx2rntXTg5wHF9eu5ePwehkl5nhHD--