Skip to content

Commit

Permalink
new time should be after existing one (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-cha authored Apr 29, 2024
1 parent 7289ad8 commit ad814bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/opchild/l2slinky/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func WritePrices(ctx sdk.Context, ok types.OracleKeeper, updatedTime time.Time,
}

qp, err := ok.GetPriceForCurrencyPair(ctx, cp)
if err == nil && !qp.BlockTimestamp.After(updatedTime) {
if err == nil && !updatedTime.After(qp.BlockTimestamp) {
return errors.New("try to update the past price")
}

Expand Down

0 comments on commit ad814bf

Please sign in to comment.