diff --git a/routing/errors.go b/routing/errors.go index 1867b110..0eb6cb37 100644 --- a/routing/errors.go +++ b/routing/errors.go @@ -39,6 +39,11 @@ const ( // announcement was given for node not found in any channel. ErrIgnored + // ErrRejected is returned if the update is for a channel ID that was + // previously added to the reject cache because of an invalid update + // was attempted to be processed. + ErrRejected + // ErrPaymentAttemptTimeout is an error that indicates that a payment // attempt timed out before we were able to successfully route an HTLC. ErrPaymentAttemptTimeout diff --git a/routing/router.go b/routing/router.go index b202ac7b..e275843a 100644 --- a/routing/router.go +++ b/routing/router.go @@ -946,7 +946,7 @@ func (r *ChannelRouter) processUpdate(msg interface{}) error { r.rejectMtx.RLock() if _, ok := r.rejectCache[msg.ChannelID]; ok { r.rejectMtx.RUnlock() - return newErrf(ErrIgnored, "recently rejected "+ + return newErrf(ErrRejected, "recently rejected "+ "chan_id=%v", msg.ChannelID) } r.rejectMtx.RUnlock() @@ -1055,7 +1055,7 @@ func (r *ChannelRouter) processUpdate(msg interface{}) error { r.rejectMtx.RLock() if _, ok := r.rejectCache[msg.ChannelID]; ok { r.rejectMtx.RUnlock() - return newErrf(ErrIgnored, "recently rejected "+ + return newErrf(ErrRejected, "recently rejected "+ "chan_id=%v", msg.ChannelID) } r.rejectMtx.RUnlock()