mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
autopilot/prefattach+interface: add API NodeScores
This commit adds a new method NodeScores to the AttachementHeuristic interface. Its intended use is to score a set of nodes according to their preference as channel counterparties. The PrefAttach heuristic gets a NodeScores method that will score the ndoes according to their number of already existing channels, similar to what is done already in Select.
This commit is contained in:
@@ -93,6 +93,13 @@ func (m *mockHeuristic) Select(self *btcec.PublicKey, graph ChannelGraph,
|
||||
}
|
||||
}
|
||||
|
||||
func (m *mockHeuristic) NodeScores(g ChannelGraph, chans []Channel,
|
||||
fundsAvailable btcutil.Amount, nodes map[NodeID]struct{}) (
|
||||
map[NodeID]*AttachmentDirective, error) {
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var _ AttachmentHeuristic = (*mockHeuristic)(nil)
|
||||
|
||||
type openChanIntent struct {
|
||||
|
Reference in New Issue
Block a user