From 4006a5c83967ad7785c5166698c785500965a7f6 Mon Sep 17 00:00:00 2001 From: georgiypetrov Date: Sun, 13 Oct 2024 19:56:57 +0400 Subject: [PATCH] fix: skip uncanonical block call --- x/symStaking/keeper/symbiotic_state_change.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/symStaking/keeper/symbiotic_state_change.go b/x/symStaking/keeper/symbiotic_state_change.go index 4ecd43b73..cddd2c6c7 100644 --- a/x/symStaking/keeper/symbiotic_state_change.go +++ b/x/symStaking/keeper/symbiotic_state_change.go @@ -171,6 +171,11 @@ func (k *Keeper) SymbioticUpdateValidatorsPower(ctx context.Context) error { break } + if strings.Contains(err.Error(), "is not currently canonical") { + k.Logger.Warn("not canonical block hash", "hash", cachedBlockHash.BlockHash) + break + } + k.apiUrls.RotateEthUrl() time.Sleep(time.Millisecond * SLEEP_ON_RETRY) }