mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-03 10:12:28 +02:00
autopilot/interface+externalscoreattach: define ScoreSettable
ScoreSettable is an interface that let caller set external scores for the heuristic. The ExternalScoreAttachment and WeightedCombAttachment heuristics implement this interface.
This commit is contained in:
@@ -23,8 +23,9 @@ func NewExternalScoreAttachment() *ExternalScoreAttachment {
|
||||
}
|
||||
|
||||
// A compile time assertion to ensure ExternalScoreAttachment meets the
|
||||
// AttachmentHeuristic interface.
|
||||
// AttachmentHeuristic and ScoreSettable interfaces.
|
||||
var _ AttachmentHeuristic = (*ExternalScoreAttachment)(nil)
|
||||
var _ ScoreSettable = (*ExternalScoreAttachment)(nil)
|
||||
|
||||
// Name returns the name of this heuristic.
|
||||
//
|
||||
@@ -38,6 +39,8 @@ func (s *ExternalScoreAttachment) Name() string {
|
||||
// of the targeted heuristic, to allow recursively target specific
|
||||
// sub-heuristics. The returned boolean indicates whether the targeted
|
||||
// heuristic was found.
|
||||
//
|
||||
// NOTE: This is a part of the ScoreSettable interface.
|
||||
func (s *ExternalScoreAttachment) SetNodeScores(targetHeuristic string,
|
||||
newScores map[NodeID]float64) (bool, error) {
|
||||
|
||||
|
Reference in New Issue
Block a user