Skip to content

Commit

Permalink
remove common error
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCherepovskyi committed Aug 30, 2024
1 parent 8c5d155 commit 954d3c0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions x/rootupdater/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/errors"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common/hexutil"
Expand Down Expand Up @@ -79,7 +78,6 @@ func (k Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *eth
return nil
}

var commonError error
// https://docs.evmos.org/protocol/modules/evm#posttxprocessing

if len(receipt.Logs) == 0 {
Expand All @@ -91,7 +89,6 @@ func (k Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *eth
event, err := stateV2.EventByID(eventId)
if err != nil {
k.Logger(ctx).Error("failed to get event by ID")
commonError = errors.Wrap(commonError, errors.Wrapf(err, "failed to get event by id %s", eventId).Error())
continue
}

Expand All @@ -103,7 +100,6 @@ func (k Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *eth
eventBody := state.PoseidonSMTRootUpdated{}
if err := utils.UnpackLog(stateV2, &eventBody, event.Name, log); err != nil {
k.Logger(ctx).Error("failed to unpack event body")
commonError = errors.Wrap(commonError, errors.Wrapf(err, "failed to unpack event %s", eventId).Error())
continue
}

Expand All @@ -115,7 +111,7 @@ func (k Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *eth
k.SetParams(ctx, params)
}

return commonError
return nil
}

func (k Keeper) Logger(ctx sdk.Context) log.Logger {
Expand Down

0 comments on commit 954d3c0

Please sign in to comment.