fix(x/epochs): Fix init genesis (#19958)
This commit is contained in:
parent
60496848d9
commit
a6039bcdc7
@ -28,8 +28,9 @@ func (k Keeper) AddEpochInfo(ctx context.Context, epoch types.EpochInfo) error {
|
||||
if epoch.StartTime.IsZero() {
|
||||
epoch.StartTime = k.environment.HeaderService.GetHeaderInfo(ctx).Time
|
||||
}
|
||||
epoch.CurrentEpochStartHeight = k.environment.HeaderService.GetHeaderInfo(ctx).Height
|
||||
|
||||
if epoch.CurrentEpochStartHeight == 0 {
|
||||
epoch.CurrentEpochStartHeight = k.environment.HeaderService.GetHeaderInfo(ctx).Height
|
||||
}
|
||||
return k.EpochInfo.Set(ctx, epoch.Identifier, epoch)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user