From f39138aa2e543438548a150bdad45304ccc3296b Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 4 Mar 2019 12:18:32 +0400 Subject: [PATCH] remove RoundState from EventDataRoundState (#3354) 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 --- consensus/types/round_state.go | 10 +++------- types/events.go | 3 --- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/consensus/types/round_state.go b/consensus/types/round_state.go index eab13b6c7..c4372e201 100644 --- a/consensus/types/round_state.go +++ b/consensus/types/round_state.go @@ -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, + Height: rs.Height, + Round: rs.Round, + Step: rs.Step.String(), } } diff --git a/types/events.go b/types/events.go index b70bc9dc5..b65ea3832 100644 --- a/types/events.go +++ b/types/events.go @@ -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 {