@@ -553,7 +553,7 @@ func (m *Manager) addScidAlias(scidAlias uint64, assetSpecifier asset.Specifier,
553553 peer route.Vertex ) error {
554554
555555 ctxb := context .Background ()
556- peerChans , err := m .RfqChannel (
556+ peerChans , err := m .FetchChannel (
557557 ctxb , assetSpecifier , & peer , NoIntention ,
558558 )
559559 if err != nil && ! strings .Contains (
@@ -568,7 +568,7 @@ func (m *Manager) addScidAlias(scidAlias uint64, assetSpecifier asset.Specifier,
568568 // is okay, because non-strict forwarding will ask each channel if the
569569 // bandwidth matches the provided specifier.
570570 if len (peerChans [peer ]) == 0 {
571- peerChans , err = m .RfqChannel (
571+ peerChans , err = m .FetchChannel (
572572 ctxb , asset.Specifier {}, & peer , NoIntention ,
573573 )
574574 if err != nil {
@@ -1033,10 +1033,10 @@ func (m *Manager) ChannelMatchesFully(ctx context.Context,
10331033 return true , nil
10341034}
10351035
1036- // ChannelWithSpecifier is a helper struct that combines the information of an
1037- // asset specifier that is satisfied by a channel with the channels' general
1036+ // TapChannel is a helper struct that combines the information of an asset
1037+ // specifier that is satisfied by a channel with the channels' general
10381038// information.
1039- type ChannelWithSpecifier struct {
1039+ type TapChannel struct {
10401040 // Specifier is the asset Specifier that is satisfied by this channels'
10411041 // assets.
10421042 Specifier asset.Specifier
@@ -1051,11 +1051,11 @@ type ChannelWithSpecifier struct {
10511051
10521052// PeerChanMap is a structure that maps peers to channels. This is used for
10531053// filtering asset channels against an asset specifier.
1054- type PeerChanMap map [route.Vertex ][]ChannelWithSpecifier
1054+ type PeerChanMap map [route.Vertex ][]TapChannel
10551055
1056- // ComputeCompatibleChannelAssetBalance computes the total local and remote
1057- // balance for each asset channel that matches the provided asset specifier.
1058- func (m * Manager ) ComputeCompatibleChannelAssetBalance (ctx context.Context ,
1056+ // ComputeChannelAssetBalance computes the total local and remote balance for
1057+ // each asset channel that matches the provided asset specifier.
1058+ func (m * Manager ) ComputeChannelAssetBalance (ctx context.Context ,
10591059 activeChannels []lndclient.ChannelInfo ,
10601060 specifier asset.Specifier ) (PeerChanMap , bool , error ) {
10611061
@@ -1106,7 +1106,7 @@ func (m *Manager) ComputeCompatibleChannelAssetBalance(ctx context.Context,
11061106 if pass || ! specifier .IsSome () {
11071107 peerChanMap [openChan .PubKeyBytes ] = append (
11081108 peerChanMap [openChan .PubKeyBytes ],
1109- ChannelWithSpecifier {
1109+ TapChannel {
11101110 Specifier : specifier ,
11111111 ChannelInfo : openChan ,
11121112 AssetInfo : assetData ,
@@ -1135,10 +1135,10 @@ const (
11351135 ReceiveIntention
11361136)
11371137
1138- // RfqChannel returns the channel to use for RFQ operations. It returns a map of
1139- // peers and their eligible channels. If a peerPubKey is specified then the map
1140- // will only contain one entry for that peer.
1141- func (m * Manager ) RfqChannel (ctx context.Context , specifier asset.Specifier ,
1138+ // FetchChannel returns the channel to use for RFQ operations. It returns a map
1139+ // of peers and their eligible channels. If a peerPubKey is specified then the
1140+ // map will only contain one entry for that peer.
1141+ func (m * Manager ) FetchChannel (ctx context.Context , specifier asset.Specifier ,
11421142 peerPubKey * route.Vertex ,
11431143 intention ChanIntention ) (PeerChanMap , error ) {
11441144
@@ -1149,8 +1149,7 @@ func (m *Manager) RfqChannel(ctx context.Context, specifier asset.Specifier,
11491149 return nil , err
11501150 }
11511151
1152- // nolint:lll
1153- balancesMap , haveGroupChans , err := m .ComputeCompatibleChannelAssetBalance (
1152+ balancesMap , haveGroupChans , err := m .ComputeChannelAssetBalance (
11541153 ctx , activeChannels , specifier ,
11551154 )
11561155 if err != nil {
0 commit comments