Title: sending getblocks message but not getting back the expected inv Post by: yzernik on January 14, 2014, 12:48:08 AM Similar question to this one https://bitcointalk.org/index.php?topic=54892.0
I am trying to download the blockchain from the beginning (genesis). I have hardcoded the genesis block in my client program. I have most of the protocol message are working. I connect using the version and verack messages. I can send a ping and get back the correct pong. But when I send a getblocks message, I don't get back any inv with a MSG_BLOCK in it. I periodically receive inv messages, but they only contain a few MSG_TX's. These are the raw bytes that I send as my getblock message. Code: f9beb4d9676574626c6f636b73000000450000008634d5ae0100000001000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f0000000000000000000000000000000000000000000000000000000000000000 I also tried it with the genesis block hash reversed, without any success. Title: Re: sending getblocks message but not getting back the expected inv Post by: TierNolan on January 14, 2014, 05:13:30 PM I also tried it with the genesis block hash reversed, without any success. It seems ok, decoding: MAGIC: f9beb4d9 Command: 676574626c6f636b73000000 Size: 45000000 CRC: 8634d5ae Version: 01000000 count: 01 Genesis: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f Stop: 0000000000000000000000000000000000000000000000000000000000000000 Can you try with the genesis set to all zeros and also with count==0 (so just the stop field). If you give it no block it knows about, it should start again at genesis. Title: Re: sending getblocks message but not getting back the expected inv Post by: yzernik on January 15, 2014, 07:26:01 PM Thank you. It looks like my problem is the way that I am decoding the inv message.
|