multi: context.Background() -> t.Context()

Use the new feature of Go 1.24, fix linter warnings.

This change was produced by:
 - running golangci-lint run --fix
 - sed 's/context.Background/t.Context/' -i `git grep -l context.Background | grep test.go`
 - manually fixing broken tests
 - itest, lntest: use ht.Context() where ht or hn is available
 - in HarnessNode.Stop() we keep using context.Background(), because it is
   called from a cleanup handler in which t.Context() is canceled already.
This commit is contained in:
Boris Nagaev
2025-08-19 14:54:41 -03:00
parent 6ffe257004
commit dee8ad3754
71 changed files with 361 additions and 393 deletions

View File

@@ -359,7 +359,7 @@ func TestBatchFund(t *testing.T) {
MinConfs: 1,
}
updates, err := h.batcher.BatchFund(
context.Background(), req,
t.Context(), req,
)
if tc.failUpdate1 || tc.failUpdate2 || tc.failPublish {