Skip to content

Commit

Permalink
* Removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianMarian committed Oct 17, 2019
1 parent eb284d7 commit d95d6e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
5 changes: 1 addition & 4 deletions sharding/multiShardCoordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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++ {
Expand Down
24 changes: 1 addition & 23 deletions statusHandler/view/termuic/termuiRenders/widgetsRender.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{""}

Expand Down

0 comments on commit d95d6e1

Please sign in to comment.