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:
Olaoluwa Osuntokun committed 2017-09-18 17:27:51 -07:00
1 parent 3e97aa3931
commit 6e7fcac1f5
2 files changed
+125 -30

No files matched your search

+1
View File
@@ -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