[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) 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 // NO-OP do not add anything here
} }

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

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

@ -84,7 +84,7 @@ func AccumulateRewards(
} }
accounts := []common.Address{} accounts := []common.Address{}
missing := shard.NodeIDList{} missing := shard.SlotList{}
for idx, member := range parentCommittee.Slots { for idx, member := range parentCommittee.Slots {
switch signed, err := mask.IndexEnabled(idx); true { 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, next, node.chainConfig, node.Consensus.ChainReader,
) )
node.Consensus.Decider.UpdateVotingPower( node.Consensus.Decider.UpdateVotingPower(
s.FindCommitteeByID(node.Consensus.ShardID).NodeList, s.FindCommitteeByID(node.Consensus.ShardID).Slots,
) )
} }

Loading…
Cancel
Save