Skip to content

Commit

Permalink
Review and clean code (if needed)
Browse files Browse the repository at this point in the history
  • Loading branch information
TuSoict committed Oct 28, 2024
1 parent 3914bc8 commit 6035640
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/oracle/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ func (ms msgServer) AggregateExchangeRateVote(goCtx context.Context, msg *types.
return nil, err
}

// params := ms.GetParams(ctx)
params := ms.GetParams(ctx)

aggregatePrevote, err := ms.GetAggregateExchangeRatePrevote(ctx, valAddr)
if err != nil {
return nil, errorsmod.Wrap(types.ErrNoAggregatePrevote, msg.Validator)
}

// Check a msg is submitted proper period
// if (uint64(ctx.BlockHeight())/params.VotePeriod)-(aggregatePrevote.SubmitBlock/params.VotePeriod) != 1 {
// return nil, types.ErrRevealPeriodMissMatch
// }
if (uint64(ctx.BlockHeight())/params.VotePeriod)-(aggregatePrevote.SubmitBlock/params.VotePeriod) != 1 {
return nil, types.ErrRevealPeriodMissMatch
}

exchangeRateTuples, err := types.ParseExchangeRateTuples(msg.ExchangeRates)
if err != nil {
Expand Down

0 comments on commit 6035640

Please sign in to comment.