Merge pull request #2960 from wpaulino/reliable-send-panic
discovery: check nil policy within isMsgStale
This commit is contained in:
1 file changed
+6
@@ -2361,6 +2361,12 @@ func (d *AuthenticatedGossiper) isMsgStale(msg lnwire.Message) bool {
|
|||||||
p = p2
|
p = p2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the policy is still unknown, then we can consider this
|
||||||
|
// policy fresh.
|
||||||
|
if p == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
timestamp := time.Unix(int64(msg.Timestamp), 0)
|
timestamp := time.Unix(int64(msg.Timestamp), 0)
|
||||||
return p.LastUpdate.After(timestamp)
|
return p.LastUpdate.After(timestamp)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user