Skip to content

Commit

Permalink
Merge pull request #583 from bnb-chain/disable_discontinue
Browse files Browse the repository at this point in the history
fix: disable discontinue on testnet
  • Loading branch information
unclezoro committed Mar 6, 2024
2 parents 7a8e377 + bcb811c commit 2ba463f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions x/storage/keeper/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ func EndBlocker(ctx sdk.Context, keeper Keeper) {
}

// delete buckets
_, err = keeper.DeleteDiscontinueBucketsUntil(ctx, blockTime, deletionMax-deleted)
if err != nil {
ctx.Logger().Error("should not happen, fail to delete buckets, err " + err.Error())
panic("should not happen")
if ctx.BlockHeight() <= 5946511 && ctx.ChainID() == "greenfield_5600-1" {
_, err = keeper.DeleteDiscontinueBucketsUntil(ctx, blockTime, deletionMax-deleted)
if err != nil {
ctx.Logger().Error("should not happen, fail to delete buckets, err " + err.Error())
panic("should not happen")
}
}

keeper.PersistDeleteInfo(ctx)

// Permission GC
Expand Down

0 comments on commit 2ba463f

Please sign in to comment.