Skip to content

Commit

Permalink
Changed ticket target percent to full percentage (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
oluwandabira authored and chappjc committed Feb 23, 2018
1 parent 26423d2 commit 61f893a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions explorer/explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ func (exp *explorerUI) Store(blockData *blockdata.BlockData, _ *wire.MsgBlock) e
Percentage: percentage(blockData.PoolInfo.Value, dcrutil.Amount(blockData.ExtraInfo.CoinSupply).ToCoin()),
Target: exp.ChainParams.TicketPoolSize * exp.ChainParams.TicketsPerBlock,
PercentTarget: func() float64 {
target := int32(exp.ChainParams.TicketPoolSize * exp.ChainParams.TicketsPerBlock)
return float64((int32(blockData.PoolInfo.Size) - target)) / float64(target) * 100
target := float64(exp.ChainParams.TicketPoolSize * exp.ChainParams.TicketsPerBlock)
return float64(blockData.PoolInfo.Size) / target * 100
}(),
},
TicketROI: percentage(dcrutil.Amount(blockData.ExtraInfo.NextBlockSubsidy.PoS).ToCoin()/5, blockData.CurrentStakeDiff.CurrentStakeDifficulty),
Expand Down

0 comments on commit 61f893a

Please sign in to comment.