@@ -31,26 +31,24 @@ import (
3131// we need to keep a reference of preprepare in order to propose locked proposal when there is a lock and itself is the proposer
3232func newRoundState (view * istanbul.View , validatorSet istanbul.ValidatorSet , lockedHash common.Hash , preprepare * istanbul.Preprepare ) * roundState {
3333 return & roundState {
34- round : view .Round ,
35- sequence : view .Sequence ,
36- Preprepare : preprepare ,
37- Prepares : newMessageSet (validatorSet ),
38- Commits : newMessageSet (validatorSet ),
39- Checkpoints : newMessageSet (validatorSet ),
40- lockedHash : lockedHash ,
41- mu : new (sync.RWMutex ),
34+ round : view .Round ,
35+ sequence : view .Sequence ,
36+ Preprepare : preprepare ,
37+ Prepares : newMessageSet (validatorSet ),
38+ Commits : newMessageSet (validatorSet ),
39+ lockedHash : lockedHash ,
40+ mu : new (sync.RWMutex ),
4241 }
4342}
4443
4544// roundState stores the consensus state
4645type roundState struct {
47- round * big.Int
48- sequence * big.Int
49- Preprepare * istanbul.Preprepare
50- Prepares * messageSet
51- Commits * messageSet
52- Checkpoints * messageSet
53- lockedHash common.Hash
46+ round * big.Int
47+ sequence * big.Int
48+ Preprepare * istanbul.Preprepare
49+ Prepares * messageSet
50+ Commits * messageSet
51+ lockedHash common.Hash
5452
5553 mu * sync.RWMutex
5654}
@@ -153,13 +151,12 @@ func (s *roundState) GetLockedHash() common.Hash {
153151// be confusing.
154152func (s * roundState ) DecodeRLP (stream * rlp.Stream ) error {
155153 var ss struct {
156- Round * big.Int
157- Sequence * big.Int
158- Preprepare * istanbul.Preprepare
159- Prepares * messageSet
160- Commits * messageSet
161- Checkpoints * messageSet
162- lockedHash common.Hash
154+ Round * big.Int
155+ Sequence * big.Int
156+ Preprepare * istanbul.Preprepare
157+ Prepares * messageSet
158+ Commits * messageSet
159+ lockedHash common.Hash
163160 }
164161
165162 if err := stream .Decode (& ss ); err != nil {
@@ -170,7 +167,6 @@ func (s *roundState) DecodeRLP(stream *rlp.Stream) error {
170167 s .Preprepare = ss .Preprepare
171168 s .Prepares = ss .Prepares
172169 s .Commits = ss .Commits
173- s .Checkpoints = ss .Checkpoints
174170 s .lockedHash = ss .lockedHash
175171 s .mu = new (sync.RWMutex )
176172
@@ -195,7 +191,6 @@ func (s *roundState) EncodeRLP(w io.Writer) error {
195191 s .Preprepare ,
196192 s .Prepares ,
197193 s .Commits ,
198- s .Checkpoints ,
199194 s .lockedHash ,
200195 })
201196}
0 commit comments