From 61106ec1ea6a4ab47ab0207088fa4f02bb1e3cc7 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Tue, 30 Apr 2024 09:48:04 -0500 Subject: [PATCH] context cleanup (#13047) --- common/client/poller.go | 3 +-- core/internal/testutils/pgtest/txdb.go | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/common/client/poller.go b/common/client/poller.go index b21f28fe604..ebdcbd66283 100644 --- a/common/client/poller.go +++ b/common/client/poller.go @@ -78,8 +78,7 @@ func (p *Poller[T]) pollingLoop() { return case <-ticker.C: // Set polling timeout - pollingCtx, cancelPolling := context.WithTimeout(context.Background(), p.pollingTimeout) - p.stopCh.CtxCancel(pollingCtx, cancelPolling) + pollingCtx, cancelPolling := p.stopCh.CtxCancel(context.WithTimeout(context.Background(), p.pollingTimeout)) // Execute polling function result, err := p.pollingFunc(pollingCtx) cancelPolling() diff --git a/core/internal/testutils/pgtest/txdb.go b/core/internal/testutils/pgtest/txdb.go index 38fe8390bab..da9fd6cb2d0 100644 --- a/core/internal/testutils/pgtest/txdb.go +++ b/core/internal/testutils/pgtest/txdb.go @@ -19,7 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/store/dialects" ) -// TODO still need to import this for side effects // txdb is a simplified version of https://github.com/DATA-DOG/go-txdb // // The original lib has various problems and is hard to understand because it