diff --git a/cosmos/x/evm/keeper/abci.go b/cosmos/x/evm/keeper/abci.go index 72a064d75..ea1a2b513 100644 --- a/cosmos/x/evm/keeper/abci.go +++ b/cosmos/x/evm/keeper/abci.go @@ -34,16 +34,12 @@ func (k *Keeper) EndBlock(ctx context.Context) error { blockNum := uint64(sdk.UnwrapSDKContext(ctx).BlockHeight()) block := k.chain.GetBlockByNumber(blockNum) if block == nil { - panic( - fmt.Sprintf( - "EVM BLOCK %d FAILED TO PROCESS", blockNum, - ), + return fmt.Errorf( + "evm block %d failed to process", blockNum, ) } else if block.NumberU64() != blockNum { - panic( - fmt.Sprintf( - "EVM BLOCK [%d] DOES NOT MATCH COMET BLOCK [%d]", block.NumberU64(), blockNum, - ), + return fmt.Errorf( + "evm block [%d] does not match comet block [%d]", block.NumberU64(), blockNum, ) } return nil