@@ -31,26 +31,24 @@ import (
31
31
// we need to keep a reference of preprepare in order to propose locked proposal when there is a lock and itself is the proposer
32
32
func newRoundState (view * istanbul.View , validatorSet istanbul.ValidatorSet , lockedHash common.Hash , preprepare * istanbul.Preprepare ) * roundState {
33
33
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 ),
42
41
}
43
42
}
44
43
45
44
// roundState stores the consensus state
46
45
type 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
54
52
55
53
mu * sync.RWMutex
56
54
}
@@ -153,13 +151,12 @@ func (s *roundState) GetLockedHash() common.Hash {
153
151
// be confusing.
154
152
func (s * roundState ) DecodeRLP (stream * rlp.Stream ) error {
155
153
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
163
160
}
164
161
165
162
if err := stream .Decode (& ss ); err != nil {
@@ -170,7 +167,6 @@ func (s *roundState) DecodeRLP(stream *rlp.Stream) error {
170
167
s .Preprepare = ss .Preprepare
171
168
s .Prepares = ss .Prepares
172
169
s .Commits = ss .Commits
173
- s .Checkpoints = ss .Checkpoints
174
170
s .lockedHash = ss .lockedHash
175
171
s .mu = new (sync.RWMutex )
176
172
@@ -195,7 +191,6 @@ func (s *roundState) EncodeRLP(w io.Writer) error {
195
191
s .Preprepare ,
196
192
s .Prepares ,
197
193
s .Commits ,
198
- s .Checkpoints ,
199
194
s .lockedHash ,
200
195
})
201
196
}
0 commit comments