Skip to content

Commit

Permalink
fix index out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
unclezoro committed Aug 10, 2020
1 parent 85ebea9 commit a85f90f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consensus/parlia/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (s *Snapshot) distanceToInTurn(validator common.Address) uint64 {
validators := s.validators()
offset := (s.Number + 1) % uint64(len(validators))
idx := uint64(0)
for idx < uint64(len(validator)) && validators[idx] != validator {
for idx < uint64(len(validators)) && validators[idx] != validator {
idx++
}
if offset > idx {
Expand Down
2 changes: 1 addition & 1 deletion params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ var (
PetersburgBlock: big.NewInt(0),
IstanbulBlock: big.NewInt(0),
MuirGlacierBlock: big.NewInt(0),
RamanujanBlock: big.NewInt(317974),
RamanujanBlock: big.NewInt(400),
Parlia: &ParliaConfig{
Period: 3,
Epoch: 200,
Expand Down

0 comments on commit a85f90f

Please sign in to comment.