I am trying to connect to litecoin nodes using raw protocol. I follow Ken Shirriff instructions from this article . My code works perfect with bitcoin, so I just replaced bitcoin nodes connection parameters with litecoin ones: port for connection and magic number for messages (as I know their protocols are the same), but It doesn't work. Have no idea what's wrong. Here is my code.