From 6dee5bbb411c7a1f211586c85734e693d144ca0e Mon Sep 17 00:00:00 2001 From: Alok Date: Sat, 3 Feb 2024 20:58:08 +0530 Subject: [PATCH] fix: lint --- pkg/settler/settler.go | 2 -- pkg/store/store_test.go | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/settler/settler.go b/pkg/settler/settler.go index 6705729..a510637 100644 --- a/pkg/settler/settler.go +++ b/pkg/settler/settler.go @@ -282,8 +282,6 @@ func (s *Settler) Start(ctx context.Context) <-chan struct{} { return err } - commitmentIndexes = commitmentIndexes[:0] - s.metrics.LastUsedNonce.Set(float64(commitmentPostingTxn.Nonce())) s.metrics.SettlementsPostedCount.Inc() s.metrics.CurrentSettlementL1Block.Set(float64(settlement.BlockNum)) diff --git a/pkg/store/store_test.go b/pkg/store/store_test.go index 3bb1ad6..b3a2d73 100644 --- a/pkg/store/store_test.go +++ b/pkg/store/store_test.go @@ -38,7 +38,12 @@ func TestStore(t *testing.T) { if err != nil { t.Fatalf("Failed to start PostgreSQL container: %s", err) } - defer postgresContainer.Terminate(ctx) + defer func() { + err := postgresContainer.Terminate(ctx) + if err != nil { + t.Errorf("Failed to terminate PostgreSQL container: %s", err) + } + }() // Retrieve the container's mapped port mappedPort, err := postgresContainer.MappedPort(ctx, "5432")