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:
2 files changed
+9
-17
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user