Skip to content

Commit

Permalink
Copy randomness on validator set copy (ethereum#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor "Nate" Graf committed Nov 21, 2019
1 parent fb3cfe0 commit 32d15e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion consensus/istanbul/validator/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ func (valSet *defaultSet) Copy() istanbul.ValidatorSet {
})
}

return NewSet(validators, valSet.policy)
valSetCopy := NewSet(validators, valSet.policy)
valSetCopy.SetRandomness(valSet.randomness)
return valSetCopy
}

func (valSet *defaultSet) F() int { return int(math.Ceil(float64(valSet.Size())/3)) - 1 }
Expand Down

0 comments on commit 32d15e8

Please sign in to comment.