lnwire: correct max payload estimate for NodeAnnouncement, add test

This commit is contained in:
Olaoluwa Osuntokun committed 2016-12-27 16:43:36 -08:00
1 parent 4790ce96a8
commit 3dc8cd5659
2 files changed
+31 -6

No files matched your search

+5 -4
View File
@@ -178,11 +178,11 @@ func (c *NodeAnnouncement) MaxPayloadLength(pver uint32) uint32 {
// Ipv6 - 16 bytes
length += 16
// Port - 2 bytes
length += 2
// Port - 4 bytes
length += 4
// NodeID - 32 bytes
length += 32
// NodeID - 33 bytes
length += 33
// RGBColor - 3 bytes
length += 3
@@ -193,6 +193,7 @@ func (c *NodeAnnouncement) MaxPayloadLength(pver uint32) uint32 {
// Alias - 32 bytes
length += 32
// 158
return length
}