lnwire: properly encode/decode addrs in NodeAnnouncement msg
This commit fixes an existing deviation in the way we encode+decode the addresses within the NodeAnnouncement message with that of the specification. Prior to this commit, we would encode the _number_ of addresses, rather than the number of bytes it takes to encode all the addresses. In this commit, we fix this mistake by properly writing out the total number of bytes, modifying our parsing to take account of this new encoding.
This commit is contained in:
2 files changed
+125
-30
No files matched your search
@@ -404,6 +404,7 @@ func TestLightningWireProtocol(t *testing.T) {
|
||||
green: uint8(r.Int31()),
|
||||
blue: uint8(r.Int31()),
|
||||
},
|
||||
// TODO(roasbeef): proper gen rand addrs
|
||||
Addresses: testAddrs,
|
||||
}
|
||||
req.Features.featuresMap = nil
|
||||
|
||||
Reference in new issue
Block a user