Skip to content

Commit

Permalink
Add WaitForSynced to beacon-chain
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKiwi committed Apr 14, 2020
1 parent cb045dd commit b901b51
Show file tree
Hide file tree
Showing 5 changed files with 345 additions and 48 deletions.
8 changes: 8 additions & 0 deletions beacon-chain/core/feed/state/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const (
ChainStarted
// Initialized is sent when the internal beacon node's state is ready to be accessed.
Initialized
// Synced is sent when the beacon node has completed syncing and is ready to participate in the network.
Synced
)

// BlockProcessedData is the data sent with BlockProcessed events.
Expand All @@ -27,6 +29,12 @@ type ChainStartedData struct {
StartTime time.Time
}

// SyncedData is the data sent with Synced events.
type SyncedData struct {
// StartTime is the time at which the chain started.
StartTime time.Time
}

// InitializedData is the data sent with Initialized events.
type InitializedData struct {
// StartTime is the time at which the chain started.
Expand Down
Loading

0 comments on commit b901b51

Please sign in to comment.