@@ -290,9 +290,9 @@ type ChannelLinkConfig struct {
290290 // restrict the flow of HTLCs and fee updates.
291291 MaxFeeExposure lnwire.MilliSatoshi
292292
293- // ShouldFwdExpEndorsement is a closure that indicates whether the link
294- // should forward experimental endorsement signals.
295- ShouldFwdExpEndorsement func () bool
293+ // ShouldFwdExpAccountability is a closure that indicates whether the
294+ // link should forward experimental accountability signals.
295+ ShouldFwdExpAccountability func () bool
296296
297297 // AuxTrafficShaper is an optional auxiliary traffic shaper that can be
298298 // used to manage the bandwidth of the link.
@@ -3163,11 +3163,11 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
31633163 continue
31643164 }
31653165
3166- endorseValue := l .experimentalEndorsement (
3166+ accountableValue := l .experimentalAccountability (
31673167 record .CustomSet (add .CustomRecords ),
31683168 )
3169- endorseType := uint64 (
3170- lnwire .ExperimentalEndorsementType ,
3169+ accountableType := uint64 (
3170+ lnwire .ExperimentalAccountableType ,
31713171 )
31723172
31733173 switch fwdPkg .State {
@@ -3191,9 +3191,9 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
31913191 BlindingPoint : fwdInfo .NextBlinding ,
31923192 }
31933193
3194- endorseValue .WhenSome (func (e byte ) {
3194+ accountableValue .WhenSome (func (e byte ) {
31953195 custRecords := map [uint64 ][]byte {
3196- endorseType : {e },
3196+ accountableType : {e },
31973197 }
31983198
31993199 outgoingAdd .CustomRecords = custRecords
@@ -3249,9 +3249,9 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
32493249 BlindingPoint : fwdInfo .NextBlinding ,
32503250 }
32513251
3252- endorseValue .WhenSome (func (e byte ) {
3252+ accountableValue .WhenSome (func (e byte ) {
32533253 addMsg .CustomRecords = map [uint64 ][]byte {
3254- endorseType : {e },
3254+ accountableType : {e },
32553255 }
32563256 })
32573257
@@ -3340,44 +3340,43 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg) {
33403340 l .forwardBatch (reforward , switchPackets ... )
33413341}
33423342
3343- // experimentalEndorsement returns the value to set for our outgoing
3344- // experimental endorsement field, and a boolean indicating whether it should
3345- // be populated on the outgoing htlc.
3346- func (l * channelLink ) experimentalEndorsement (
3343+ // experimentalAccountability returns the value to set for our outgoing
3344+ // experimental accountable field.
3345+ func (l * channelLink ) experimentalAccountability (
33473346 customUpdateAdd record.CustomSet ) fn.Option [byte ] {
33483347
33493348 // Only relay experimental signal if we are within the experiment
33503349 // period.
3351- if ! l .cfg .ShouldFwdExpEndorsement () {
3350+ if ! l .cfg .ShouldFwdExpAccountability () {
33523351 return fn .None [byte ]()
33533352 }
33543353
33553354 // If we don't have any custom records or the experimental field is
33563355 // not set, just forward a zero value.
33573356 if len (customUpdateAdd ) == 0 {
3358- return fn.Some [byte ](lnwire .ExperimentalUnendorsed )
3357+ return fn.Some [byte ](lnwire .ExperimentalUnaccountable )
33593358 }
33603359
3361- t := uint64 (lnwire .ExperimentalEndorsementType )
3360+ t := uint64 (lnwire .ExperimentalAccountableType )
33623361 value , set := customUpdateAdd [t ]
33633362 if ! set {
3364- return fn.Some [byte ](lnwire .ExperimentalUnendorsed )
3363+ return fn.Some [byte ](lnwire .ExperimentalUnaccountable )
33653364 }
33663365
33673366 // We expect at least one byte for this field, consider it invalid if
33683367 // it has no data and just forward a zero value.
33693368 if len (value ) == 0 {
3370- return fn.Some [byte ](lnwire .ExperimentalUnendorsed )
3369+ return fn.Some [byte ](lnwire .ExperimentalUnaccountable )
33713370 }
33723371
3373- // Only forward endorsed if the incoming link is endorsed .
3374- if value [0 ] == lnwire .ExperimentalEndorsed {
3375- return fn.Some [byte ](lnwire .ExperimentalEndorsed )
3372+ // Only forward accountable if the incoming link is accountable .
3373+ if value [0 ] == lnwire .ExperimentalAccountable {
3374+ return fn.Some [byte ](lnwire .ExperimentalAccountable )
33763375 }
33773376
3378- // Forward as unendorsed otherwise, including cases where we've
3377+ // Forward as unaccountable otherwise, including cases where we've
33793378 // received an invalid value that uses more than 3 bits of information.
3380- return fn.Some [byte ](lnwire .ExperimentalUnendorsed )
3379+ return fn.Some [byte ](lnwire .ExperimentalUnaccountable )
33813380}
33823381
33833382// processExitHop handles an htlc for which this link is the exit hop. It
0 commit comments