diff --git a/cmd/harmony/main.go b/cmd/harmony/main.go index 4fbccb253..fd5dd7e04 100644 --- a/cmd/harmony/main.go +++ b/cmd/harmony/main.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") diff --git a/core/blockchain.go b/core/blockchain.go index 9edac1b04..892cccbac 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2408,11 +2408,7 @@ func (bc *BlockChain) UpdateValidatorVotingPower(state shard.State) error { for _, committee := range state { for _, slot := range committee.Slots { - utils.Logger().Print("TTTTTTT") - utils.Logger().Print(committee.ShardID) if slot.TotalStake != nil { - utils.Logger().Print("AAAAAA") - utils.Logger().Print(slot.TotalStake) if _, ok := addrToEffectiveStakes[slot.EcdsaAddress]; !ok { addrToEffectiveStakes[slot.EcdsaAddress] = map[uint32]numeric.Dec{} } @@ -2425,9 +2421,6 @@ func (bc *BlockChain) UpdateValidatorVotingPower(state shard.State) error { totalEffectiveStake[committee.ShardID] = numeric.NewDec(0) } totalEffectiveStake[committee.ShardID] = totalEffectiveStake[committee.ShardID].Add(*slot.TotalStake) - utils.Logger().Print("BBBBBB") - utils.Logger().Print(totalEffectiveStake[committee.ShardID]) - utils.Logger().Print(addrToEffectiveStakes[slot.EcdsaAddress][committee.ShardID]) } } } @@ -2440,9 +2433,6 @@ func (bc *BlockChain) UpdateValidatorVotingPower(state shard.State) error { addrTotalVotingPower = addrTotalVotingPower.Add(eStake.Quo(totalEffectiveStake[shardID])) addrTotalEffectiveStake = addrTotalEffectiveStake.Add(eStake) } - utils.Logger().Print("CCCCCCC") - utils.Logger().Print(addrTotalVotingPower) - utils.Logger().Print(addrTotalEffectiveStake) // Retrieve the stats and update stats, err := rawdb.ReadValidatorStats(bc.db, addr) if stats == nil { diff --git a/node/node_handler.go b/node/node_handler.go index 335178607..edd022926 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -386,8 +386,6 @@ func (node *Node) PostConsensusProcessing(newBlock *types.Block, commitSigAndBit // Update voting power of validators for all shards if len(newBlock.Header().ShardState()) > 0 { shardState := shard.State{} - utils.Logger().Print("XXXXXXXX") - utils.Logger().Print(shardState.JSON()) if err := rlp.DecodeBytes(newBlock.Header().ShardState(), &shardState); err == nil { if err = node.Blockchain().UpdateValidatorVotingPower(shardState); err != nil { utils.Logger().Err(err)