From a74d0fc84fdb44e6a4da47880b46dbcea75edc76 Mon Sep 17 00:00:00 2001 From: Mikhail Wall Date: Thu, 27 Jun 2024 16:53:34 +0200 Subject: [PATCH] fix: trying internal ctx --- p2p/pkg/depositmanager/autodeposit.go | 2 +- p2p/pkg/rpc/bidder/service.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/p2p/pkg/depositmanager/autodeposit.go b/p2p/pkg/depositmanager/autodeposit.go index eda45fffa..cd97a5732 100644 --- a/p2p/pkg/depositmanager/autodeposit.go +++ b/p2p/pkg/depositmanager/autodeposit.go @@ -180,7 +180,7 @@ func (adt *AutoDepositTracker) WithdrawAutoDeposit(ctx context.Context, windowNu }) lastWindowNumber := windows[len(windows)-1] - eg, egCtx := errgroup.WithContext(ctx) + eg, egCtx := errgroup.WithContext(context.Background()) egCtx, cancel := context.WithCancel(egCtx) evt := events.NewEventHandler( diff --git a/p2p/pkg/rpc/bidder/service.go b/p2p/pkg/rpc/bidder/service.go index 3a59463f4..56772efcd 100644 --- a/p2p/pkg/rpc/bidder/service.go +++ b/p2p/pkg/rpc/bidder/service.go @@ -391,7 +391,7 @@ func (s *Service) AutoDeposit( } if len(ads) > 0 { - err := s.autoDepositTracker.DoAutoMoveToAnotherWindow(context.Background(), ads) + err := s.autoDepositTracker.DoAutoMoveToAnotherWindow(ctx, ads) if err != nil { return nil, status.Errorf(codes.Internal, "auto deposit: %v", err) } @@ -431,7 +431,7 @@ func (s *Service) CancelAndWithdrawAutoDeposit( if err != nil { return nil, status.Errorf(codes.FailedPrecondition, "cancel auto deposit: %v", err) } - err = s.autoDepositTracker.WithdrawAutoDeposit(context.Background(), cancelResponse.WindowNumbers) + err = s.autoDepositTracker.WithdrawAutoDeposit(ctx, cancelResponse.WindowNumbers) if err != nil { return nil, status.Errorf(codes.Internal, "withdrawal: %v", err) }