Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
add DayEpochID
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Sep 20, 2023
1 parent 92e0754 commit 57fbbb6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion x/epochs/types/epoch_identifier.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package types

const (
IncentiveEpochId = "incentive"
WeekEpochId = "week"
DayEpochId = "day"
)
16 changes: 13 additions & 3 deletions x/epochs/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,25 @@ func NewGenesisState(epochs []EpochInfo) *GenesisState {

// DefaultGenesis returns the default genesis state
func DefaultGenesis() *GenesisState {
startTime := time.Time{}
return &GenesisState{
Epochs: []EpochInfo{
{
Identifier: IncentiveEpochId,
Identifier: WeekEpochId,
StartTime: time.Time{},
Duration: time.Hour * 24 * 7 * 90,
Duration: time.Hour * 24 * 7,
CurrentEpoch: 0,
CurrentEpochStartHeight: 0,
CurrentEpochStartTime: time.Time{},
CurrentEpochStartTime: startTime,
EpochCountingStarted: false,
},
{
Identifier: DayEpochId,
StartTime: time.Time{},
Duration: time.Hour * 24,
CurrentEpoch: 0,
CurrentEpochStartHeight: 0,
CurrentEpochStartTime: startTime,
EpochCountingStarted: false,
},
},
Expand Down

0 comments on commit 57fbbb6

Please sign in to comment.