From 4eafccb91562035b542a8bcc42407427af9fa515 Mon Sep 17 00:00:00 2001 From: Tomasz Slabon Date: Mon, 13 May 2024 10:29:08 +0200 Subject: [PATCH] Context-related renames --- pkg/tbtc/inactivity.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/tbtc/inactivity.go b/pkg/tbtc/inactivity.go index bd5aaaa87c..39bcfc00f8 100644 --- a/pkg/tbtc/inactivity.go +++ b/pkg/tbtc/inactivity.go @@ -67,7 +67,7 @@ func newInactivityClaimExecutor( } func (ice *inactivityClaimExecutor) claimInactivity( - parentCtx context.Context, + ctx context.Context, inactiveMembersIndexes []group.MemberIndex, heartbeatFailed bool, sessionID *big.Int, @@ -129,12 +129,12 @@ func (ice *inactivityClaimExecutor) claimInactivity( signer.signingGroupMemberIndex, ) - ctx, cancelCtx := context.WithCancel(parentCtx) - defer cancelCtx() + signerCtx, cancelSignerCtx := context.WithCancel(ctx) + defer cancelSignerCtx() subscription := ice.chain.OnInactivityClaimed( func(event *InactivityClaimedEvent) { - defer cancelCtx() + defer cancelSignerCtx() execLogger.Infof( "[member:%v] Inactivity claim submitted for wallet "+ @@ -150,7 +150,7 @@ func (ice *inactivityClaimExecutor) claimInactivity( defer subscription.Unsubscribe() err := ice.publishInactivityClaim( - ctx, + signerCtx, execLogger, sessionID, signer.signingGroupMemberIndex,