autopilot: update AttachmentHeuristics with context

Continue threading context through the autopilot system and remove the
remaining context.TODOs.
This commit is contained in:
Elle Mouton committed 2025-05-22 14:14:38 +02:00
1 parent 1c6c6436af
commit 3f218dfbbe
12 files changed
+41 -37

No files matched your search

+3 -1
View File
@@ -1,6 +1,7 @@
package autopilot_test
import (
"context"
"testing"
"github.com/btcsuite/btcd/btcec/v2"
@@ -22,6 +23,7 @@ func randKey() (*btcec.PublicKey, error) {
// ExternalScoreAttachment correctly reflects the scores we set last.
func TestSetNodeScores(t *testing.T) {
t.Parallel()
ctx := context.Background()
const name = "externalscore"
@@ -62,7 +64,7 @@ func TestSetNodeScores(t *testing.T) {
q[nID] = struct{}{}
}
resp, err := h.NodeScores(
nil, nil, btcutil.Amount(btcutil.SatoshiPerBitcoin), q,
ctx, nil, nil, btcutil.Amount(btcutil.SatoshiPerBitcoin), q,
)
if err != nil {
t.Fatal(err)