mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-07 11:22:10 +02:00
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:
@@ -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