lnwire: modify ReadMessage to no longer return the total bytes read

This commit modifies ReadMessage to no longer return the total bytes
read as this value will now be calculated at a higher level. The
io.Reader that’s passed to ReadMessage is expected to contain the
_entire_ message rather than be a pointer into a stream that contains
the message itself.
This commit is contained in:
Olaoluwa Osuntokun
2017-04-20 15:41:43 -07:00
parent 38d3c72dc8
commit aa2ca81762
2 changed files with 9 additions and 17 deletions

View File

@@ -111,7 +111,7 @@ func TestLightningWireProtocol(t *testing.T) {
// Finally, we'll deserialize the message from the written
// buffer, and finally assert that the messages are equal.
_, newMsg, err := ReadMessage(&b, 0)
newMsg, err := ReadMessage(&b, 0)
if err != nil {
t.Fatalf("unable to read msg: %v", err)
return false