Bitcoin Forum
May 20, 2024, 10:34:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: sending getblocks message but not getting back the expected inv  (Read 538 times)
yzernik (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 14, 2014, 12:48:08 AM
 #1

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.
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
January 14, 2014, 05:13:30 PM
 #2

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.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
yzernik (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 15, 2014, 07:26:01 PM
 #3

Thank you. It looks like my problem is the way that I am decoding the inv message.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!