@@ -681,7 +681,7 @@ func (b *Builder) handleNetworkUpdate(vb *ValidationBarrier,
681681 update .err <- err
682682
683683 case IsError (err , ErrParentValidationFailed ):
684- update .err <- newErrf (ErrIgnored , err .Error ())
684+ update .err <- NewErrf (ErrIgnored , err .Error ()) //nolint
685685
686686 default :
687687 log .Warnf ("unexpected error during validation " +
@@ -1053,7 +1053,7 @@ func (b *Builder) assertNodeAnnFreshness(node route.Vertex,
10531053 "existence of node: %v" , err )
10541054 }
10551055 if ! exists {
1056- return newErrf (ErrIgnored , "Ignoring node announcement" +
1056+ return NewErrf (ErrIgnored , "Ignoring node announcement" +
10571057 " for node not found in channel graph (%x)" ,
10581058 node [:])
10591059 }
@@ -1063,7 +1063,7 @@ func (b *Builder) assertNodeAnnFreshness(node route.Vertex,
10631063 // if not then we won't accept the new data as it would override newer
10641064 // data.
10651065 if ! lastUpdate .Before (msgTimestamp ) {
1066- return newErrf (ErrOutdated , "Ignoring outdated " +
1066+ return NewErrf (ErrOutdated , "Ignoring outdated " +
10671067 "announcement for %x" , node [:])
10681068 }
10691069
@@ -1193,11 +1193,11 @@ func (b *Builder) processUpdate(msg interface{},
11931193 "existence: %v" , err )
11941194 }
11951195 if isZombie {
1196- return newErrf (ErrIgnored , "ignoring msg for zombie " +
1196+ return NewErrf (ErrIgnored , "ignoring msg for zombie " +
11971197 "chan_id=%v" , msg .ChannelID )
11981198 }
11991199 if exists {
1200- return newErrf (ErrIgnored , "ignoring msg for known " +
1200+ return NewErrf (ErrIgnored , "ignoring msg for known " +
12011201 "chan_id=%v" , msg .ChannelID )
12021202 }
12031203
@@ -1259,7 +1259,7 @@ func (b *Builder) processUpdate(msg interface{},
12591259 default :
12601260 }
12611261
1262- return newErrf (ErrNoFundingTransaction , "unable to " +
1262+ return NewErrf (ErrNoFundingTransaction , "unable to " +
12631263 "locate funding tx: %v" , err )
12641264 }
12651265
@@ -1294,7 +1294,7 @@ func (b *Builder) processUpdate(msg interface{},
12941294 return err
12951295 }
12961296
1297- return newErrf (ErrInvalidFundingOutput , "output " +
1297+ return NewErrf (ErrInvalidFundingOutput , "output " +
12981298 "failed validation: %w" , err )
12991299 }
13001300
@@ -1313,7 +1313,7 @@ func (b *Builder) processUpdate(msg interface{},
13131313 }
13141314 }
13151315
1316- return newErrf (ErrChannelSpent , "unable to fetch utxo " +
1316+ return NewErrf (ErrChannelSpent , "unable to fetch utxo " +
13171317 "for chan_id=%v, chan_point=%v: %v" ,
13181318 msg .ChannelID , fundingPoint , err )
13191319 }
@@ -1378,7 +1378,7 @@ func (b *Builder) processUpdate(msg interface{},
13781378 b .cfg .ChannelPruneExpiry
13791379
13801380 if isZombie && isStaleUpdate {
1381- return newErrf (ErrIgnored , "ignoring stale update " +
1381+ return NewErrf (ErrIgnored , "ignoring stale update " +
13821382 "(flags=%v|%v) for zombie chan_id=%v" ,
13831383 msg .MessageFlags , msg .ChannelFlags ,
13841384 msg .ChannelID )
@@ -1387,7 +1387,7 @@ func (b *Builder) processUpdate(msg interface{},
13871387 // If the channel doesn't exist in our database, we cannot
13881388 // apply the updated policy.
13891389 if ! exists {
1390- return newErrf (ErrIgnored , "ignoring update " +
1390+ return NewErrf (ErrIgnored , "ignoring update " +
13911391 "(flags=%v|%v) for unknown chan_id=%v" ,
13921392 msg .MessageFlags , msg .ChannelFlags ,
13931393 msg .ChannelID )
@@ -1405,7 +1405,7 @@ func (b *Builder) processUpdate(msg interface{},
14051405
14061406 // Ignore outdated message.
14071407 if ! edge1Timestamp .Before (msg .LastUpdate ) {
1408- return newErrf (ErrOutdated , "Ignoring " +
1408+ return NewErrf (ErrOutdated , "Ignoring " +
14091409 "outdated update (flags=%v|%v) for " +
14101410 "known chan_id=%v" , msg .MessageFlags ,
14111411 msg .ChannelFlags , msg .ChannelID )
@@ -1417,7 +1417,7 @@ func (b *Builder) processUpdate(msg interface{},
14171417
14181418 // Ignore outdated message.
14191419 if ! edge2Timestamp .Before (msg .LastUpdate ) {
1420- return newErrf (ErrOutdated , "Ignoring " +
1420+ return NewErrf (ErrOutdated , "Ignoring " +
14211421 "outdated update (flags=%v|%v) for " +
14221422 "known chan_id=%v" , msg .MessageFlags ,
14231423 msg .ChannelFlags , msg .ChannelID )
0 commit comments