mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 06:02:51 +02:00
discovery+lnwire: remove embedding within ReplyChannelRange
In order to prep for allowing TLV extensions for the `ReplyChannelRange` and `QueryChannelRange` messages, we'll need to remove the struct embedding as is. If we don't remove this, then we'll attempt to decode TLV extensions from both the embedded and outer struct. All relevant call sites have been updated to reflect this minor change.
This commit is contained in:
committed by
Johan T. Halseth
parent
466c079bbe
commit
dd6f0ba931
@ -30,7 +30,7 @@ func TestReplyChannelRangeUnsorted(t *testing.T) {
|
||||
var req2 ReplyChannelRange
|
||||
err = req2.Decode(bytes.NewReader(b.Bytes()), 0)
|
||||
if _, ok := err.(ErrUnsortedSIDs); !ok {
|
||||
t.Fatalf("expected ErrUnsortedSIDs, got: %T",
|
||||
t.Fatalf("expected ErrUnsortedSIDs, got: %v",
|
||||
err)
|
||||
}
|
||||
})
|
||||
@ -67,13 +67,11 @@ func TestReplyChannelRangeEmpty(t *testing.T) {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
req := ReplyChannelRange{
|
||||
QueryChannelRange: QueryChannelRange{
|
||||
FirstBlockHeight: 1,
|
||||
NumBlocks: 2,
|
||||
},
|
||||
Complete: 1,
|
||||
EncodingType: test.encType,
|
||||
ShortChanIDs: nil,
|
||||
FirstBlockHeight: 1,
|
||||
NumBlocks: 2,
|
||||
Complete: 1,
|
||||
EncodingType: test.encType,
|
||||
ShortChanIDs: nil,
|
||||
}
|
||||
|
||||
// First decode the hex string in the test case into a
|
||||
|
Reference in New Issue
Block a user