ricmoo / pycoind

Pure-Python full node and libraries for bitcoind-based crypto-currencies (eg. bitcoin, litecoin, etc)
MIT License
120 stars 44 forks source link

verack message not parsed on initial receive #13

Closed venzen closed 9 years ago

venzen commented 9 years ago

Messaging works flawlessly between pycoind nodes but when pycoind connects to a Satoshi client it does not parse the Satoshi client's verack message when it is initially received.

Only when the Satoshi client later sends an inv message does its previous verack message get processed by pycoind. It seems there is a one byte length difference between pycoind's expected verack length and the length actually received.

I am not very familiar with low level binary data streams but it seems a simple fix. Where in the code can this be implemented?

venzen commented 9 years ago

Solved. Not a length issue or messaging bug, but a matter of prioritizing processing of the receive buffer.