Bitcoin Forum
May 08, 2024, 02:04:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Exception 'CDataStream::read() : end of data' caught  (Read 2174 times)
Atheros (OP)
Sr. Member
****
Offline Offline

Activity: 249
Merit: 251



View Profile WWW
August 30, 2011, 03:34:31 AM
 #1

I'm having a great deal of difficulty interacting with the Bitcoin client according to the Protocol Specification. I'm concerned something is wrong.

Suppose I connect to my Bitcoin client using a custom program written in Python. Suppose when I receive an addr message from the client, I repeat the entire thing back two or three times. This should work fine, right? This is what the debug.log of the Bitcoin client shows:

Quote
sending: addr (811 bytes)
received: addr (811 bytes)
ProcessMessage(addr, 811 bytes) : Exception 'CDataStream::read() : end of data' caught, normally caused by a message being shorter than its stated length
ProcessMessage(addr, 811 bytes) FAILED


PROCESSMESSAGE SKIPPED 4 BYTES

received: addr (811 bytes)
ProcessMessage(addr, 811 bytes) : Exception 'CDataStream::read() : end of data' caught, normally caused by a message being shorter than its stated length
ProcessMessage(addr, 811 bytes) FAILED


PROCESSMESSAGE SKIPPED 4 BYTES

received: addr (811 bytes)
ProcessMessage(addr, 811 bytes) : Exception 'CDataStream::read() : end of data' caught, normally caused by a message being shorter than its stated length
ProcessMessage(addr, 811 bytes) FAILED

The log also shows that verack and getaddr messages SOMETIMES aren't processed by the client correctly even though I always send the same message to the client.

Quote
received: verack (0 bytes)
ProcessMessage(verack, 0 bytes) FAILED
received: getaddr (0 bytes)
ProcessMessage(getaddr, 0 bytes) FAILED

I've verified in Wireshark that the addr message being repeated by my program (and received by the client) are identical to the ones that the client sent out.

BM-GteJMPqvHRUdUHHa1u7dtYnfDaH5ogeY
Bitmessage.org - Decentralized, trustless, encrypted, authenticated messaging protocol and client.
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!