Skip to content

Commit

Permalink
chore: fix logs in fraud proposal (#1479)
Browse files Browse the repository at this point in the history
Co-authored-by: Omri <[email protected]>
  • Loading branch information
danwt and omritoptix authored Nov 15, 2024
1 parent a308fd0 commit 1336044
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x/rollapp/keeper/fraud_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ func (k Keeper) SubmitRollappFraud(goCtx context.Context, msg *types.MsgRollappF

if msg.Authority != k.authority {
err := errorsmod.Wrap(gerrc.ErrUnauthenticated, "only the gov module can submit fraud proposals")
ctx.Logger().Error(err.Error())
ctx.Logger().Error("Fraud proposal.", err)
return nil, err
}

if err := msg.ValidateBasic(); err != nil {
err = errorsmod.Wrap(gerrc.ErrInvalidArgument, "invalid msg")
ctx.Logger().Error(err.Error())
ctx.Logger().Error("Fraud proposal.", err)
return nil, err
}

rollapp, found := k.GetRollapp(ctx, msg.RollappId)
if !found {
err := errorsmod.Wrap(gerrc.ErrNotFound, "rollapp not found")
ctx.Logger().Error(err.Error())
ctx.Logger().Error("Fraud proposal.", err)
return nil, err
}

// validate the rollapp is past its genesis bridge phase
if !rollapp.IsTransferEnabled() {
err := errorsmod.Wrap(gerrc.ErrFailedPrecondition, "rollapp is not past genesis bridge phase")
ctx.Logger().Error(err.Error())
ctx.Logger().Error("Fraud proposal.", err)
return nil, err
}

Expand All @@ -47,7 +47,7 @@ func (k Keeper) SubmitRollappFraud(goCtx context.Context, msg *types.MsgRollappF
err := k.sequencerKeeper.PunishSequencer(ctx, msg.PunishSequencerAddress, msg.MustRewardee())
if err != nil {
err = errorsmod.Wrap(err, "jail sequencer")
ctx.Logger().Error(err.Error())
ctx.Logger().Error("Fraud proposal.", err)
return nil, err
}
}
Expand All @@ -59,7 +59,7 @@ func (k Keeper) SubmitRollappFraud(goCtx context.Context, msg *types.MsgRollappF
err := k.HardFork(ctx, msg.RollappId, msg.FraudHeight)
if err != nil {
err = errorsmod.Wrap(err, "hard fork")
ctx.Logger().Error(err.Error())
ctx.Logger().Error("Fraud proposal.", err)
return nil, err
}

Expand Down

0 comments on commit 1336044

Please sign in to comment.