programmingbitcoin icon indicating copy to clipboard operation
programmingbitcoin copied to clipboard

Fix handshake code example, updating answer and comments.

Open chanhosuh opened this issue 6 years ago • 2 comments

Address issue #143:

  • fix boolean condition in example code
  • remove extra verack send
  • update answer accordingly
  • update handshake method comments

chanhosuh avatar Jun 30 '19 22:06 chanhosuh

Hi. I still receive an error, because there is no 'parse' for 'VersionMessage'. The error happens whenever I try the lines in pg. 183 and the solution to the 'handshake' exercise. The error happens after I updated both pieces of code, according to the fix explained here.

This is the error: AttributeError: type object 'VersionMessage' has no attribute 'parse'

The solution, of course, is to implement the 'parse' method for 'VersionMessage'. Strangely, the method does not figure in the source code or in the book.

I am writing that parse method right now and things seem to work finally.

xamevou avatar Mar 07 '21 00:03 xamevou

Hi. I still receive an error, because there is no 'parse' for 'VersionMessage'. The error happens whenever I try the lines in pg. 183 and the solution to the 'handshake' exercise. The error happens after I updated both pieces of code, according to the fix explained here.

Here is an example of the parse method for VersionMessage: https://github.com/jimmysong/programmingbitcoin/issues/143#issuecomment-954243762

0xtrr avatar Jan 23 '22 16:01 0xtrr