Skip to content

Commit

Permalink
Context-related renames
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed May 13, 2024
1 parent 9ad6371 commit 4eafccb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/tbtc/inactivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func newInactivityClaimExecutor(
}

func (ice *inactivityClaimExecutor) claimInactivity(
parentCtx context.Context,
ctx context.Context,
inactiveMembersIndexes []group.MemberIndex,
heartbeatFailed bool,
sessionID *big.Int,
Expand Down Expand Up @@ -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 "+
Expand All @@ -150,7 +150,7 @@ func (ice *inactivityClaimExecutor) claimInactivity(
defer subscription.Unsubscribe()

err := ice.publishInactivityClaim(
ctx,
signerCtx,
execLogger,
sessionID,
signer.signingGroupMemberIndex,
Expand Down

0 comments on commit 4eafccb

Please sign in to comment.