Remove local change

pull/1866/head
Rongjian Lan 5 years ago
parent 33a452fa4e
commit 929a44dbd5
  1. 2
      cmd/harmony/main.go
  2. 12
      consensus/quorum/one-node-staked-vote.go
  3. 2
      shard/committee/assignment.go

@ -101,7 +101,7 @@ var (
// beaconSyncFreq indicates beaconchain sync frequency
beaconSyncFreq = flag.Int("beacon_sync_freq", 60, "unit in seconds")
// blockPeriod indicates the how long the leader waits to propose a new block.
blockPeriod = flag.Int("block_period", 2, "how long in second the leader waits to propose a new block.")
blockPeriod = flag.Int("block_period", 8, "how long in second the leader waits to propose a new block.")
leaderOverride = flag.Bool("leader_override", false, "true means override the default leader role and acts as validator")
// shardID indicates the shard ID of this node
shardID = flag.Int("shard_id", -1, "the shard ID of this node")

@ -191,12 +191,12 @@ func (v *stakedVoteWeight) SetVoters(
Str("Raw-Staked", v.stakedTotal.String()).
Msg("Total staked")
//switch {
//case totalStakedPercent.Equal(totalShare) == false:
// return nil, errSumOfVotingPowerNotOne
//case ourPercentage.Add(theirPercentage).Equal(totalShare) == false:
// return nil, errSumOfOursAndTheirsNotOne
//}
switch {
case totalStakedPercent.Equal(totalShare) == false:
return nil, errSumOfVotingPowerNotOne
case ourPercentage.Add(theirPercentage).Equal(totalShare) == false:
return nil, errSumOfOursAndTheirsNotOne
}
// Hold onto this calculation
v.ourVotingPowerTotal = ourPercentage

@ -7,7 +7,7 @@ import (
"github.com/harmony-one/bls/ffi/go/bls"
"github.com/harmony-one/harmony/block"
common2 "github.com/harmony-one/harmony/internal/common"
"github.com/harmony-one/harmony/internal/configs/sharding"
shardingconfig "github.com/harmony-one/harmony/internal/configs/sharding"
"github.com/harmony-one/harmony/internal/ctxerror"
"github.com/harmony-one/harmony/internal/params"
"github.com/harmony-one/harmony/internal/utils"

Loading…
Cancel
Save