Skip to content

Commit

Permalink
fix: trying internal ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Jun 27, 2024
1 parent 1f73b01 commit a74d0fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion p2p/pkg/depositmanager/autodeposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions p2p/pkg/rpc/bidder/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit a74d0fc

Please sign in to comment.