Merge pull request #5258 from wpaulino/validation-barrier-err-deadlock
routing: return err on validation barrier failure of network update
This commit is contained in:
commit
af289a180c
@ -1031,7 +1031,8 @@ func (d *AuthenticatedGossiper) networkHandler() {
|
|||||||
announcement.msg,
|
announcement.msg,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err != routing.ErrVBarrierShuttingDown {
|
if err != routing.ErrVBarrierShuttingDown &&
|
||||||
|
err != routing.ErrParentValidationFailed {
|
||||||
log.Warnf("unexpected error "+
|
log.Warnf("unexpected error "+
|
||||||
"during validation "+
|
"during validation "+
|
||||||
"barrier shutdown: %v",
|
"barrier shutdown: %v",
|
||||||
@ -1561,7 +1562,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
|||||||
routing.ErrIgnored) {
|
routing.ErrIgnored) {
|
||||||
|
|
||||||
log.Debug(err)
|
log.Debug(err)
|
||||||
} else {
|
} else if err != routing.ErrVBarrierShuttingDown {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2042,7 +2043,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
|||||||
if routing.IsError(err, routing.ErrOutdated,
|
if routing.IsError(err, routing.ErrOutdated,
|
||||||
routing.ErrIgnored) {
|
routing.ErrIgnored) {
|
||||||
log.Debug(err)
|
log.Debug(err)
|
||||||
} else {
|
} else if err != routing.ErrVBarrierShuttingDown {
|
||||||
d.rejectMtx.Lock()
|
d.rejectMtx.Lock()
|
||||||
d.recentRejects[msg.ShortChannelID.ToUint64()] = struct{}{}
|
d.recentRejects[msg.ShortChannelID.ToUint64()] = struct{}{}
|
||||||
d.rejectMtx.Unlock()
|
d.rejectMtx.Unlock()
|
||||||
|
@ -1038,12 +1038,19 @@ func (r *ChannelRouter) networkHandler() {
|
|||||||
update.msg,
|
update.msg,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err != ErrVBarrierShuttingDown &&
|
switch err {
|
||||||
err != ErrParentValidationFailed {
|
case ErrVBarrierShuttingDown:
|
||||||
|
update.err <- err
|
||||||
|
case ErrParentValidationFailed:
|
||||||
|
update.err <- newErrf(
|
||||||
|
ErrIgnored, err.Error(),
|
||||||
|
)
|
||||||
|
default:
|
||||||
log.Warnf("unexpected error "+
|
log.Warnf("unexpected error "+
|
||||||
"during validation "+
|
"during validation "+
|
||||||
"barrier shutdown: %v",
|
"barrier shutdown: %v",
|
||||||
err)
|
err)
|
||||||
|
update.err <- err
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user