Sending getblocks message but not getting inv message response

0

I am building my own bitcoin client, and I have most of the protocol working from https://en.bitcoin.it/wiki/Protocol_Specification.

I successfully make a connection with the version and verack commands. And when I send a ping, I get back a pong with the same nonce.

The problem I am having now is that I don't get the expected response to my getblocks message. I build the block locator using the hash of the genesis block header, and I serialize the message and send it.

But then I don't get the inv message with MSG_BLOCK like I expect.

These are the raw bytes that I send as my getblocks message:

f9beb4d9676574626c6f636b73000000450000008634d5ae0100000001000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f0000000000000000000000000000000000000000000000000000000000000000

This is built following the specification here https://en.bitcoin.it/wiki/Protocol_Specification#getblocks.

yzernik

Posted 2014-01-14T00:06:30.850

Reputation: 173

Your question got cut off!kaoD 2014-01-14T15:01:19.817

Should be fixed now.yzernik 2014-01-14T18:57:18.113

1Just guessing: try reversing the order of char[32] of the hash. I'm doing offline blockchain analysis and it's stored as trailing zeroes, not leading.kaoD 2014-01-14T19:19:02.773

Answers

0

I actually do receive the inv message. The problem is in the way that I try to decode the inv message.

The getblocks message seems to work fine.

yzernik

Posted 2014-01-14T00:06:30.850

Reputation: 173