Skip to content

Commit

Permalink
remove RoundState from EventDataRoundState
Browse files Browse the repository at this point in the history
Before we're using it to get a round state in tests. Now it can be done
by calling csX.GetRoundState. We will need to rewrite
TestStateSlashingPrevotes and TestStateSlashingPrecommits, which are
commented right now, to not rely on EventDataRoundState#RoundState
field.

Refs #1527
  • Loading branch information
melekes committed Feb 26, 2019
1 parent ec9bff5 commit b0f4788
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions consensus/types/round_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,10 @@ func (rs *RoundState) CompleteProposalEvent() types.EventDataCompleteProposal {

// RoundStateEvent returns the H/R/S of the RoundState as an event.
func (rs *RoundState) RoundStateEvent() types.EventDataRoundState {
// copy the RoundState.
// TODO: if we want to avoid this, we may need synchronous events after all
rsCopy := *rs
return types.EventDataRoundState{
Height: rs.Height,
Round: rs.Round,
Step: rs.Step.String(),
RoundState: &rsCopy,
}
}

Expand Down
3 changes: 0 additions & 3 deletions types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ type EventDataRoundState struct {
Height int64 `json:"height"`
Round int `json:"round"`
Step string `json:"step"`

// private, not exposed to websockets
RoundState interface{} `json:"-"`
}

type ValidatorInfo struct {
Expand Down

0 comments on commit b0f4788

Please sign in to comment.