Merge pull request #10610 from ellemouton/graph-cleanup-todo-contexts

graph/db+refactor: surface all `context.TODO()`s
This commit is contained in:
Elle authored and GitHub committed 2026-02-26 16:18:31 +02:00
commit 8126b424fd
31 files changed
+642 -484

No files matched your search

+7 -5
View File
@@ -458,7 +458,7 @@ func TestChannelUpdateValidation(t *testing.T) {
// Assert that the initially configured fee is retrieved correctly.
_, e1, e2, err := ctx.graph.FetchChannelEdgesByID(
lnwire.NewShortChanIDFromInt(1).ToUint64(),
t.Context(), lnwire.NewShortChanIDFromInt(1).ToUint64(),
)
require.NoError(t, err, "cannot retrieve channel")
@@ -530,7 +530,7 @@ func TestChannelUpdateValidation(t *testing.T) {
require.Error(t, err, "expected route to fail with channel update")
_, e1, e2, err = ctx.graph.FetchChannelEdgesByID(
lnwire.NewShortChanIDFromInt(1).ToUint64(),
t.Context(), lnwire.NewShortChanIDFromInt(1).ToUint64(),
)
require.NoError(t, err, "cannot retrieve channel")
@@ -552,7 +552,7 @@ func TestChannelUpdateValidation(t *testing.T) {
// This time a valid signature was supplied and the policy change should
// have been applied to the graph.
_, e1, e2, err = ctx.graph.FetchChannelEdgesByID(
lnwire.NewShortChanIDFromInt(1).ToUint64(),
t.Context(), lnwire.NewShortChanIDFromInt(1).ToUint64(),
)
require.NoError(t, err, "cannot retrieve channel")
@@ -593,7 +593,7 @@ func TestSendPaymentErrorRepeatedFeeInsufficient(t *testing.T) {
// to sophon. We'll obtain this as we'll need to to generate the
// FeeInsufficient error that we'll send back.
_, _, edgeUpdateToFail, err := ctx.graph.FetchChannelEdgesByID(
songokuSophonChanID,
t.Context(), songokuSophonChanID,
)
require.NoError(t, err, "unable to fetch chan id")
@@ -946,7 +946,9 @@ func TestSendPaymentErrorNonFinalTimeLockErrors(t *testing.T) {
chanID := ctx.getChannelIDFromAlias(t, "roasbeef", "songoku")
roasbeefSongoku := lnwire.NewShortChanIDFromInt(chanID)
_, _, edgeUpdateToFail, err := ctx.graph.FetchChannelEdgesByID(chanID)
_, _, edgeUpdateToFail, err := ctx.graph.FetchChannelEdgesByID(
t.Context(), chanID,
)
require.NoError(t, err, "unable to fetch chan id")
errChanUpdate := lnwire.ChannelUpdate1{