[slashing] Update Naming from Master merge

pull/1850/head
Edgar Aroutiounian 5 years ago
parent cd228e9a6f
commit 6c2cfae12c
  1. 2
      consensus/quorum/one-node-one-vote.go
  2. 2
      consensus/quorum/one-node-staked-vote.go
  3. 2
      consensus/quorum/quorum.go
  4. 2
      internal/chain/reward.go
  5. 2
      node/node_handler.go

@ -43,7 +43,7 @@ func (v *uniformVoteWeight) IsRewardThresholdAchieved() bool {
return v.SignersCount(Commit) >= (v.ParticipantsCount() * 9 / 10)
}
func (v *uniformVoteWeight) UpdateVotingPower(shard.NodeIDList) {
func (v *uniformVoteWeight) UpdateVotingPower(shard.SlotList) {
// NO-OP do not add anything here
}

@ -107,7 +107,7 @@ func (v *stakedVoteWeight) Award(
return payout
}
func (v *stakedVoteWeight) UpdateVotingPower(staked shard.NodeIDList) {
func (v *stakedVoteWeight) UpdateVotingPower(staked shard.SlotList) {
s, _ := v.ShardIDProvider()()
v.validatorStakes = map[[shard.PublicKeySizeInBytes]byte]stakedVoter{}

@ -107,7 +107,7 @@ type Decider interface {
slash.Slasher
WithJSONDump
ToggleActive(*bls.PublicKey) bool
UpdateVotingPower(shard.NodeIDList)
UpdateVotingPower(shard.SlotList)
Policy() Policy
IsQuorumAchieved(Phase) bool
QuorumThreshold() *big.Int

@ -84,7 +84,7 @@ func AccumulateRewards(
}
accounts := []common.Address{}
missing := shard.NodeIDList{}
missing := shard.SlotList{}
for idx, member := range parentCommittee.Slots {
switch signed, err := mask.IndexEnabled(idx); true {

@ -377,7 +377,7 @@ func (node *Node) PostConsensusProcessing(newBlock *types.Block, commitSigAndBit
next, node.chainConfig, node.Consensus.ChainReader,
)
node.Consensus.Decider.UpdateVotingPower(
s.FindCommitteeByID(node.Consensus.ShardID).NodeList,
s.FindCommitteeByID(node.Consensus.ShardID).Slots,
)
}

Loading…
Cancel
Save