From 6c2cfae12c45ebe5484e2a381e9555cfde60159e Mon Sep 17 00:00:00 2001 From: Edgar Aroutiounian Date: Wed, 20 Nov 2019 12:41:35 -0800 Subject: [PATCH] [slashing] Update Naming from Master merge --- consensus/quorum/one-node-one-vote.go | 2 +- consensus/quorum/one-node-staked-vote.go | 2 +- consensus/quorum/quorum.go | 2 +- internal/chain/reward.go | 2 +- node/node_handler.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/consensus/quorum/one-node-one-vote.go b/consensus/quorum/one-node-one-vote.go index 1231ff209..bc029a844 100644 --- a/consensus/quorum/one-node-one-vote.go +++ b/consensus/quorum/one-node-one-vote.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 } diff --git a/consensus/quorum/one-node-staked-vote.go b/consensus/quorum/one-node-staked-vote.go index 22ab7879d..1ce499d02 100644 --- a/consensus/quorum/one-node-staked-vote.go +++ b/consensus/quorum/one-node-staked-vote.go @@ -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{} diff --git a/consensus/quorum/quorum.go b/consensus/quorum/quorum.go index 80615969f..333a42f1a 100644 --- a/consensus/quorum/quorum.go +++ b/consensus/quorum/quorum.go @@ -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 diff --git a/internal/chain/reward.go b/internal/chain/reward.go index 87faec233..f462d1d4d 100644 --- a/internal/chain/reward.go +++ b/internal/chain/reward.go @@ -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 { diff --git a/node/node_handler.go b/node/node_handler.go index 06e5d1625..12aaa37c3 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -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, ) }