Skip to content

Commit

Permalink
support other ibc modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Neznaykin committed May 11, 2024
1 parent 8d7be09 commit eb2a96b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ import (
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
gaia "github.com/cosmos/gaia/v15/x/metaprotocols"
ibcaccounts "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts"
ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee"
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v7/modules/core"
ibccore "github.com/cosmos/ibc-go/v7/modules/core"
ibclightclient "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"
interchainprovider "github.com/cosmos/interchain-security/v3/x/ccv/provider"
"github.com/pkg/errors"
Expand Down Expand Up @@ -221,7 +223,9 @@ func MakeEncodingConfig() codec.Codec {
vesting.AppModuleBasic{},
nftmodule.AppModuleBasic{},
consensus.AppModuleBasic{},
ibc.AppModuleBasic{},
ibccore.AppModuleBasic{},
ibcfee.AppModuleBasic{},
ibcaccounts.AppModuleBasic{},
ibclightclient.AppModuleBasic{},
interchainprovider.AppModuleBasic{},
gaia.AppModuleBasic{},
Expand Down
8 changes: 4 additions & 4 deletions pkg/worker/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6

_blockDur := time.Now()
if block, err = w.grpcClient.Block(ctx2, height); err != nil {
return err
return fmt.Errorf("failed to get block: %w", err)
}
w.log.Debug().
Int("worker_number", workerIndex).
Expand All @@ -131,7 +131,7 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6
var err error
_validatorsDur := time.Now()
if vals, err = w.grpcClient.Validators(ctx2, height); err != nil {
return err
return fmt.Errorf("failed to get validators: %w", err)
}
w.log.Debug().
Int("worker_number", workerIndex).
Expand All @@ -147,7 +147,7 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6
_blockEventsDur := time.Now()
beginBlockEvents, endBlockEvents, err = w.rpcClient.GetBlockEvents(ctx2, height)
if err != nil {
return err
return fmt.Errorf("failed to get block events: %w", err)
}

w.log.Debug().
Expand All @@ -160,7 +160,7 @@ func (w *Worker) processHeight(ctx context.Context, workerIndex int, height int6
})

if err := g.Wait(); err != nil {
w.log.Error().Int64(keyHeight, height).Err(err).Msg("processHeight block got error")
w.log.Error().Int64(keyHeight, height).Err(err).Msg("processHeight error")
w.setErrorStatusWithLogging(ctx, height, err.Error())
return
}
Expand Down

0 comments on commit eb2a96b

Please sign in to comment.