Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Specify cron genesis entries #326

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions actors/builtin/cron/cron_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
addr "github.com/filecoin-project/go-address"

"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin"
)

type State struct {
Expand All @@ -18,3 +19,11 @@ type Entry struct {
func ConstructState(entries []Entry) *State {
return &State{Entries: entries}
}

// The default entries to install in the cron actor's state at genesis.
func BuiltInEntries() []Entry {
return []Entry{{
Receiver: builtin.StoragePowerActorAddr,
MethodNum: builtin.MethodsPower.OnEpochTickEnd,
}}
}