Closed GoogleCodeExporter closed 9 years ago
Thank you for the report. The PeerAddress roundtrip serialization is indeed
broken. The attached patch contains a test case that doesn't rely on SELF_CHECK
being set, as well as fixing the actual problem.
Original comment by noa.res...@gmail.com
on 21 Jun 2011 at 12:34
Attachments:
This issue was closed by revision r101.
Original comment by hearn@google.com
on 24 Jun 2011 at 1:03
It doesn't look like the PeerAddress.services variable is every initialized,
which causes an NPE on connection:
java.lang.NullPointerException
at com.google.bitcoin.core.Utils.uint64ToByteStreamLE(Unknown Source)
at com.google.bitcoin.core.PeerAddress.bitcoinSerializeToStream(Unknown Source)
at com.google.bitcoin.core.VersionMessage.bitcoinSerializeToStream(Unknown Source)
at com.google.bitcoin.core.Message.bitcoinSerialize(Unknown Source)
at com.google.bitcoin.core.BitcoinSerializer.serialize(Unknown Source)
at com.google.bitcoin.core.NetworkConnection.writeMessage(Unknown Source)
at com.google.bitcoin.core.NetworkConnection.<init>(Unknown Source)
Original comment by stuh...@gmail.com
on 25 Jun 2011 at 8:55
Sorry about that. The attached patch adds a testcase for serializing a
PeerAddress constructed without parsing, and a fix to the problem.
Original comment by noa.res...@gmail.com
on 25 Jun 2011 at 3:57
Attachments:
Thanks, this fixes the issue.
Original comment by stuh...@gmail.com
on 26 Jun 2011 at 7:37
This issue was closed by revision r103.
Original comment by hearn@google.com
on 27 Jun 2011 at 11:25
I checked in a modified version of the patch to not rely on the localhost
address (which is not the same as the loopback address).
Original comment by hearn@google.com
on 27 Jun 2011 at 11:26
Original issue reported on code.google.com by
nathan.baulch
on 14 Jun 2011 at 5:11