Skip to content

Commit

Permalink
rename round to batch in log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bordalix committed Feb 6, 2025
1 parent a9b2b18 commit 17ebdbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions pkg/client-sdk/covenant_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1146,10 +1146,10 @@ func (a *covenantArkClient) handleRoundStream(
case client.RoundFinalizedEvent:
return event.(client.RoundFinalizedEvent).Txid, nil
case client.RoundFailedEvent:
return "", fmt.Errorf("round failed: %s", event.(client.RoundFailedEvent).Reason)
return "", fmt.Errorf("batch failed: %s", event.(client.RoundFailedEvent).Reason)
case client.RoundFinalizationEvent:
pingStop()
log.Info("a round finalization started")
log.Info("a batch finalization started")

signedForfeitTxs, signedRoundTx, err := a.handleRoundFinalization(
ctx, event.(client.RoundFinalizationEvent), vtxosToSign, boardingUtxos, receivers,
Expand All @@ -1159,7 +1159,7 @@ func (a *covenantArkClient) handleRoundStream(
}

if len(signedForfeitTxs) <= 0 && len(vtxosToSign) > 0 {
log.Info("no forfeit txs to sign, waiting for the next round")
log.Info("no forfeit txs to sign, waiting for the next batch")
continue
}

Expand All @@ -1169,7 +1169,7 @@ func (a *covenantArkClient) handleRoundStream(
}

log.Info("done.")
log.Info("waiting for round finalization...")
log.Info("waiting for batch finalization...")
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions pkg/client-sdk/covenantless_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1712,19 +1712,19 @@ func (a *covenantlessArkClient) handleRoundStream(
if step != roundFinalization {
continue
}
log.Infof("round completed %s", event.(client.RoundFinalizedEvent).Txid)
log.Infof("batch completed %s", event.(client.RoundFinalizedEvent).Txid)
return event.(client.RoundFinalizedEvent).Txid, nil
case client.RoundFailedEvent:
if event.(client.RoundFailedEvent).ID == round.ID {
return "", fmt.Errorf("round failed: %s", event.(client.RoundFailedEvent).Reason)
return "", fmt.Errorf("batch failed: %s", event.(client.RoundFailedEvent).Reason)
}
continue
case client.RoundSigningStartedEvent:
pingStop()
if step != start {
continue
}
log.Info("a round signing started")
log.Info("a batch signing started")
skipped, err := a.handleRoundSigningStarted(
ctx, signerSessions, event.(client.RoundSigningStartedEvent),
)
Expand All @@ -1740,7 +1740,7 @@ func (a *covenantlessArkClient) handleRoundStream(
continue
}
pingStop()
log.Info("round combined nonces generated")
log.Info("batch combined nonces generated")
if err := a.handleRoundSigningNoncesGenerated(
ctx, event.(client.RoundSigningNoncesGeneratedEvent), signerSessions,
); err != nil {
Expand All @@ -1753,7 +1753,7 @@ func (a *covenantlessArkClient) handleRoundStream(
continue
}
pingStop()
log.Info("a round finalization started")
log.Info("a batch finalization started")

signedForfeitTxs, signedRoundTx, err := a.handleRoundFinalization(
ctx, event.(client.RoundFinalizationEvent), vtxosToSign, boardingUtxos, receivers,
Expand All @@ -1763,7 +1763,7 @@ func (a *covenantlessArkClient) handleRoundStream(
}

if len(signedForfeitTxs) <= 0 && len(vtxosToSign) > 0 {
log.Info("no forfeit txs to sign, waiting for the next round")
log.Info("no forfeit txs to sign, waiting for the next batch")
continue
}

Expand All @@ -1773,7 +1773,7 @@ func (a *covenantlessArkClient) handleRoundStream(
}

log.Info("done.")
log.Info("waiting for round finalization...")
log.Info("waiting for batch finalization...")
step++
continue
}
Expand Down

0 comments on commit 17ebdbf

Please sign in to comment.