Skip to content

Commit

Permalink
20 block price feed changed to 40
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsingh33 committed Oct 16, 2023
1 parent e93cb55 commit acdcac9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions x/bandoracle/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ func BeginBlocker(ctx sdk.Context, _ abci.RequestBeginBlock, k keeper.Keeper) {

block := k.GetLastBlockHeight(ctx)
if block != types.Int64Zero {
// if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero && ctx.BlockHeight() != block {
if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero {
// if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero && ctx.BlockHeight() != block {
if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero {
if !k.GetCheckFlag(ctx) {
msg := k.GetFetchPriceMsg(ctx)
_, err := k.FetchPrice(ctx, msg)
Expand Down
1 change: 1 addition & 0 deletions x/bandoracle/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
var _ paramtypes.ParamSet = (*Params)(nil)

const (
Int64Forty = int64(40)
Int64Twenty = int64(20)
Int64TwentyOne = int64(21)
Int64One = int64(1)
Expand Down
4 changes: 2 additions & 2 deletions x/market/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ func BeginBlocker(ctx sdk.Context, _ abci.RequestBeginBlock, k keeper.Keeper, ba
if bandKeeper.GetOracleValidationResult(ctx) {
block := bandKeeper.GetLastBlockHeight(ctx)
if block != types.Int64Zero {
// if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero && ctx.BlockHeight() != block && bandKeeper.GetCheckFlag(ctx) {
if ctx.BlockHeight()%types.Int64Twenty == types.Int64Zero {
// if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero && ctx.BlockHeight() != block && bandKeeper.GetCheckFlag(ctx) {
if ctx.BlockHeight()%types.Int64Forty == types.Int64Zero {
discardData := bandKeeper.GetDiscardData(ctx)
if discardData.DiscardBool {
allTwa := k.GetAllTwa(ctx)
Expand Down
1 change: 1 addition & 0 deletions x/market/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
var _ paramstypes.ParamSet = (*Params)(nil)

const (
Int64Forty = int64(40)
Int64Twenty = int64(20)
Int64TwentyOne = int64(21)
Int64Ten = int64(10)
Expand Down

0 comments on commit acdcac9

Please sign in to comment.