Skip to content

Commit

Permalink
rename CoinType to QiType
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlincecum committed May 15, 2024
1 parent f630ce3 commit b926e9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions quaistats/quaistats.go
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ type blockDetailStats struct {
QuaiPerQi string `json:"quaiPerQi"`
QuaiReward string `json:"quaiReward"`
QiReward string `json:"qiReward"`
CoinType bool `json:"coinType"`
QiType bool `json:"qiType"`
}

// Everyone sends every block
Expand Down Expand Up @@ -1243,12 +1243,12 @@ func (s *Service) assembleBlockDetailStats(block *types.WorkObject) *blockDetail
if block == nil {
return nil
}
coinType := block.Coinbase().IsInQiLedgerScope()
qiType := block.Coinbase().IsInQiLedgerScope()
difficulty := block.Difficulty().String()
quaiPerQi := misc.QiToQuai(block, big.NewInt(1)).String()
var quaiReward *big.Int
var qiReward *big.Int
if coinType {
if qiType {
qiReward = misc.CalculateReward(block)
quaiReward = misc.QiToQuai(block, qiReward)
} else {
Expand All @@ -1268,7 +1268,7 @@ func (s *Service) assembleBlockDetailStats(block *types.WorkObject) *blockDetail
QuaiPerQi: quaiPerQi,
QuaiReward: quaiReward.String(),
QiReward: qiReward.String(),
CoinType: coinType,
QiType: qiType,
}
}

Expand Down

0 comments on commit b926e9e

Please sign in to comment.