Skip to content

Commit

Permalink
fix(epochs): counting epoch from first block rather than genesis time (
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin authored Dec 16, 2024
1 parent ab95cfd commit bcb6034
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions x/epochs/keeper/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func (k Keeper) BeginBlocker(ctx sdk.Context) {

switch {
case shouldInitialEpochStart:
epochInfo.StartTime = ctx.BlockTime() // a hack so epochs will start in regard of the first block, instead of the genesis time
epochInfo = startInitialEpoch(epochInfo)
logger.Info(fmt.Sprintf("initial %s epoch", epochInfo.Identifier))
case shouldEpochStart:
Expand Down

0 comments on commit bcb6034

Please sign in to comment.