discovery: always add chan announcements to the reject cache if err != ErrIgnored
In this commit, we make a change to always add chan announcements to the reject cache if we didn't reject them for already existing. Without this change, if we end up rejecting a channel announcement say because the channel is already spent or the funding transaction doesn't exist, then we'll end up continually re-validating the same set of channels we know will fail, when they're sent to us by peers. Fixes #5191
This commit is contained in:
parent
791a82878d
commit
c959ecc4c9
@ -1741,6 +1741,10 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
|||||||
} else {
|
} else {
|
||||||
log.Tracef("Router rejected channel "+
|
log.Tracef("Router rejected channel "+
|
||||||
"edge: %v", err)
|
"edge: %v", err)
|
||||||
|
|
||||||
|
d.rejectMtx.Lock()
|
||||||
|
d.recentRejects[msg.ShortChannelID.ToUint64()] = struct{}{}
|
||||||
|
d.rejectMtx.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
nMsg.err <- err
|
nMsg.err <- err
|
||||||
|
Loading…
Reference in New Issue
Block a user