@@ -553,7 +553,7 @@ func (m *Manager) addScidAlias(scidAlias uint64, assetSpecifier asset.Specifier,
553
553
peer route.Vertex ) error {
554
554
555
555
ctxb := context .Background ()
556
- peerChans , err := m .RfqChannel (
556
+ peerChans , err := m .FetchChannel (
557
557
ctxb , assetSpecifier , & peer , NoIntention ,
558
558
)
559
559
if err != nil && ! strings .Contains (
@@ -568,7 +568,7 @@ func (m *Manager) addScidAlias(scidAlias uint64, assetSpecifier asset.Specifier,
568
568
// is okay, because non-strict forwarding will ask each channel if the
569
569
// bandwidth matches the provided specifier.
570
570
if len (peerChans [peer ]) == 0 {
571
- peerChans , err = m .RfqChannel (
571
+ peerChans , err = m .FetchChannel (
572
572
ctxb , asset.Specifier {}, & peer , NoIntention ,
573
573
)
574
574
if err != nil {
@@ -1033,10 +1033,10 @@ func (m *Manager) ChannelMatchesFully(ctx context.Context,
1033
1033
return true , nil
1034
1034
}
1035
1035
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
1038
1038
// information.
1039
- type ChannelWithSpecifier struct {
1039
+ type TapChannel struct {
1040
1040
// Specifier is the asset Specifier that is satisfied by this channels'
1041
1041
// assets.
1042
1042
Specifier asset.Specifier
@@ -1051,11 +1051,11 @@ type ChannelWithSpecifier struct {
1051
1051
1052
1052
// PeerChanMap is a structure that maps peers to channels. This is used for
1053
1053
// filtering asset channels against an asset specifier.
1054
- type PeerChanMap map [route.Vertex ][]ChannelWithSpecifier
1054
+ type PeerChanMap map [route.Vertex ][]TapChannel
1055
1055
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 ,
1059
1059
activeChannels []lndclient.ChannelInfo ,
1060
1060
specifier asset.Specifier ) (PeerChanMap , bool , error ) {
1061
1061
@@ -1106,7 +1106,7 @@ func (m *Manager) ComputeCompatibleChannelAssetBalance(ctx context.Context,
1106
1106
if pass || ! specifier .IsSome () {
1107
1107
peerChanMap [openChan .PubKeyBytes ] = append (
1108
1108
peerChanMap [openChan .PubKeyBytes ],
1109
- ChannelWithSpecifier {
1109
+ TapChannel {
1110
1110
Specifier : specifier ,
1111
1111
ChannelInfo : openChan ,
1112
1112
AssetInfo : assetData ,
@@ -1135,10 +1135,10 @@ const (
1135
1135
ReceiveIntention
1136
1136
)
1137
1137
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 ,
1142
1142
peerPubKey * route.Vertex ,
1143
1143
intention ChanIntention ) (PeerChanMap , error ) {
1144
1144
@@ -1149,8 +1149,7 @@ func (m *Manager) RfqChannel(ctx context.Context, specifier asset.Specifier,
1149
1149
return nil , err
1150
1150
}
1151
1151
1152
- // nolint:lll
1153
- balancesMap , haveGroupChans , err := m .ComputeCompatibleChannelAssetBalance (
1152
+ balancesMap , haveGroupChans , err := m .ComputeChannelAssetBalance (
1154
1153
ctx , activeChannels , specifier ,
1155
1154
)
1156
1155
if err != nil {
0 commit comments