mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 22:32:15 +00:00
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
This commit is contained in:
parent
8a962ffc46
commit
f39138aa2e
@ -148,14 +148,10 @@ func (rs *RoundState) CompleteProposalEvent() types.EventDataCompleteProposal {
|
|||||||
|
|
||||||
// RoundStateEvent returns the H/R/S of the RoundState as an event.
|
// RoundStateEvent returns the H/R/S of the RoundState as an event.
|
||||||
func (rs *RoundState) RoundStateEvent() types.EventDataRoundState {
|
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{
|
return types.EventDataRoundState{
|
||||||
Height: rs.Height,
|
Height: rs.Height,
|
||||||
Round: rs.Round,
|
Round: rs.Round,
|
||||||
Step: rs.Step.String(),
|
Step: rs.Step.String(),
|
||||||
RoundState: &rsCopy,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,9 +87,6 @@ type EventDataRoundState struct {
|
|||||||
Height int64 `json:"height"`
|
Height int64 `json:"height"`
|
||||||
Round int `json:"round"`
|
Round int `json:"round"`
|
||||||
Step string `json:"step"`
|
Step string `json:"step"`
|
||||||
|
|
||||||
// private, not exposed to websockets
|
|
||||||
RoundState interface{} `json:"-"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ValidatorInfo struct {
|
type ValidatorInfo struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user