[PR] Address PR comments #1

pull/1850/head
Edgar Aroutiounian 5 years ago
parent a1f637f990
commit 0114330744
  1. 6
      consensus/quorum/one-node-staked-vote.go
  2. 2
      consensus/quorum/quorum.go

@ -28,7 +28,7 @@ type stakedVoteWeight struct {
DependencyInjectionWriter
DependencyInjectionReader
slash.ThresholdDecider
validatorStakes map[[shard.PublicKeySizeInBytes]byte]stakedVoter
validatorStakes map[shard.BlsPublicKey]stakedVoter
total numeric.Dec
}
@ -48,7 +48,7 @@ func (v *stakedVoteWeight) IsQuorumAchieved(p Phase) bool {
w.FromLibBLSPublicKey(members[i])
// isHMY := v.validatorStakes[w].isHarmonyNode
if v.ReadSignature(p, members[i]) == nil {
//
// TODO TODO finish this logic
}
}
@ -104,7 +104,7 @@ func (v *stakedVoteWeight) Award(
func (v *stakedVoteWeight) UpdateVotingPower(staked shard.SlotList) {
s, _ := v.ShardIDProvider()()
v.validatorStakes = map[[shard.PublicKeySizeInBytes]byte]stakedVoter{}
v.validatorStakes = map[shard.BlsPublicKey]stakedVoter{}
v.Reset([]Phase{Prepare, Commit, ViewChange})
for i := range staked {

@ -297,7 +297,7 @@ func NewDecider(p Policy) Decider {
c.DependencyInjectionWriter,
c.DependencyInjectionWriter.(DependencyInjectionReader),
c.SignatureReader.(slash.ThresholdDecider),
map[[shard.PublicKeySizeInBytes]byte]stakedVoter{},
map[shard.BlsPublicKey]stakedVoter{},
numeric.ZeroDec(),
}
default:

Loading…
Cancel
Save