lnwire: add new ExtraOpaqueData field to gossip messages

In this commit, we add a new field to all the existing gossip messages:
ExtraOpqueData. We do this, as before this commit, if we came across a
ChannelUpdate message with a set of optional fields, then we wouldn't be
able to properly parse the signatures related to the message. If we
never corrected this behavior, then we would violate the forwards
compatible principle we use when parsing existing messages.

As these messages can now be padded out to the max message size, we've
increased the MaxPayloadLength value for all of these messages.

Fixes #1814.
This commit is contained in:
Olaoluwa Osuntokun committed 2018-09-04 20:52:39 -07:00
1 parent 309e656a97
commit 941a123ab0
5 files changed
+125 -90

No files matched your search

+4 -2
View File
@@ -6,6 +6,8 @@ import (
"encoding/binary"
"reflect"
"testing"
"github.com/davecgh/go-spew/spew"
)
var (
@@ -66,8 +68,8 @@ func TestEncodeDecodeCode(t *testing.T) {
}
if !reflect.DeepEqual(failure1, failure2) {
t.Fatalf("failure message are different, failure "+
"code(%v)", failure1.Code())
t.Fatalf("expected %v, got %v", spew.Sdump(failure1),
spew.Sdump(failure2))
}
}
}