From 94b8ff69a45d7d13a1f4ffa9f392a33d2cb95b20 Mon Sep 17 00:00:00 2001 From: RafilxTenfen Date: Tue, 17 Sep 2024 09:47:37 -0300 Subject: [PATCH] chore: update error with block height --- clientcontroller/babylon.go | 2 +- finality-provider/service/app.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clientcontroller/babylon.go b/clientcontroller/babylon.go index 629ee015..5468994a 100644 --- a/clientcontroller/babylon.go +++ b/clientcontroller/babylon.go @@ -276,7 +276,7 @@ func (bc *BabylonController) QueryFinalityProviderVotingPower(fpPk *btcec.Public blockHeight, ) if err != nil { - return 0, fmt.Errorf("failed to query Finality Voting Power at Height: %w", err) + return 0, fmt.Errorf("failed to query Finality Voting Power at Height %d: %w", blockHeight, err) } return res.VotingPower, nil diff --git a/finality-provider/service/app.go b/finality-provider/service/app.go index 65def6c7..6698d208 100644 --- a/finality-provider/service/app.go +++ b/finality-provider/service/app.go @@ -257,7 +257,7 @@ func (app *FinalityProviderApp) SyncFinalityProviderStatus() error { if err != nil { // if error occured then the finality-provider is not registered in the Babylon chain yet or // there is nothing in the voting power table, so it should not start the fp. - allowedErr := fmt.Sprintf("failed to query Finality Voting Power at Height: rpc error: code = Unknown desc = %s: unknown request", bstypes.ErrVotingPowerTableNotUpdated.Wrapf("height: %d", latestBlock.Height).Error()) + allowedErr := fmt.Sprintf("failed to query Finality Voting Power at Height %d: rpc error: code = Unknown desc = %s: unknown request", latestBlock.Height, bstypes.ErrVotingPowerTableNotUpdated.Wrapf("height: %d", latestBlock.Height).Error()) if !strings.EqualFold(err.Error(), allowedErr) { // if nothing was updated in the voting power table, it should consider as zero VP to start to send pub random continue