mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 06:21:40 +01:00
Merge branch '0-18-4-branch-rc1-9084' into 0-18-4-branch-rc1
This commit is contained in:
commit
31ace742a5
2 changed files with 6 additions and 6 deletions
|
@ -835,12 +835,6 @@ func (g *GossipSyncer) processChanRangeReply(msg *lnwire.ReplyChannelRange) erro
|
|||
}
|
||||
|
||||
g.prevReplyChannelRange = msg
|
||||
if len(msg.Timestamps) != 0 &&
|
||||
len(msg.Timestamps) != len(msg.ShortChanIDs) {
|
||||
|
||||
return fmt.Errorf("number of timestamps not equal to " +
|
||||
"number of SCIDs")
|
||||
}
|
||||
|
||||
for i, scid := range msg.ShortChanIDs {
|
||||
info := channeldb.NewChannelUpdateInfo(
|
||||
|
|
|
@ -104,6 +104,12 @@ func (c *ReplyChannelRange) Decode(r io.Reader, pver uint32) error {
|
|||
// Set the corresponding TLV types if they were included in the stream.
|
||||
if val, ok := typeMap[TimestampsRecordType]; ok && val == nil {
|
||||
c.Timestamps = timeStamps
|
||||
|
||||
// Check that a timestamp was provided for each SCID.
|
||||
if len(c.Timestamps) != len(c.ShortChanIDs) {
|
||||
return fmt.Errorf("number of timestamps does not " +
|
||||
"match number of SCIDs")
|
||||
}
|
||||
}
|
||||
|
||||
if len(tlvRecords) != 0 {
|
||||
|
|
Loading…
Add table
Reference in a new issue