From d95d6e1d1db130cf90d0a5c3286b171ab9141772 Mon Sep 17 00:00:00 2001 From: Sebastian Marian Date: Thu, 17 Oct 2019 16:46:33 +0300 Subject: [PATCH] * Removed commented code --- sharding/multiShardCoordinator.go | 5 +--- .../termuic/termuiRenders/widgetsRender.go | 24 +------------------ 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/sharding/multiShardCoordinator.go b/sharding/multiShardCoordinator.go index c38c47dacc6..2ddf587af11 100644 --- a/sharding/multiShardCoordinator.go +++ b/sharding/multiShardCoordinator.go @@ -46,6 +46,7 @@ func (msc *multiShardCoordinator) calculateMasks() (uint32, uint32) { return (1 << uint(n)) - 1, (1 << uint(n-1)) - 1 } +//TODO: This method should be changed, as value 0xFF in the last byte of the given address could exist also in shards func isMetaChainShardId(identifier []byte) bool { for i := 0; i < len(identifier); i++ { if identifier[i] != metaChainIdentifier { @@ -65,10 +66,6 @@ func (msc *multiShardCoordinator) ComputeId(address state.AddressContainer) uint } buffNeeded := address.Bytes()[startingIndex:] - //TODO: This method should be changed, as value 0xFF in the last byte of the given address could exist also in shards - //if isMetaChainShardId(buffNeeded) { - // return MetachainShardId - //} addr := uint32(0) for i := 0; i < len(buffNeeded); i++ { diff --git a/statusHandler/view/termuic/termuiRenders/widgetsRender.go b/statusHandler/view/termuic/termuiRenders/widgetsRender.go index bf4d688a3f3..a37696d0460 100644 --- a/statusHandler/view/termuic/termuiRenders/widgetsRender.go +++ b/statusHandler/view/termuic/termuiRenders/widgetsRender.go @@ -146,29 +146,7 @@ func (wr *WidgetsRender) prepareInstanceInfo() { countAcceptedBlocks := wr.presenter.GetCountAcceptedBlocks() rows[5] = []string{fmt.Sprintf("Consensus leader accepted / proposed blocks : %d / %d", countAcceptedBlocks, countLeader)} - //TODO: Fix these prints - //switch instanceType { - //case string(core.NodeTypeValidator): - // rewardsPerHour := wr.presenter.CalculateRewardsPerHour() - // rows[6] = []string{fmt.Sprintf("Rewards estimation: %s ERD/h (without fees)", rewardsPerHour)} - // - // var rewardsInfo []string - // totalRewardsValue, diffRewards := wr.presenter.GetTotalRewardsValue() - // if diffRewards != "0" { - // wr.instanceInfo.RowStyles[7] = ui.NewStyle(ui.ColorGreen) - // rewardsInfo = []string{fmt.Sprintf("Total rewards %s ERD + %s", totalRewardsValue, diffRewards)} - // } else { - // wr.instanceInfo.RowStyles[7] = ui.NewStyle(ui.ColorWhite) - // rewardsInfo = []string{fmt.Sprintf("Total rewards %s ERD", totalRewardsValue)} - // } - // rows[7] = rewardsInfo - // - //default: - // rows[6] = []string{""} - // rows[7] = []string{""} - // - //} - + //TODO: The rewards calculation for printing should be fixed rows[6] = []string{""} rows[7] = []string{""}