Skip to content

Commit de43c2e

Browse files
committed
func name
1 parent 8527a4d commit de43c2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

consensus/cuckoo/consensus.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header,
735735
}
736736

737737
//log.Info(fmt.Sprintf("parent: %v, current: %v, +%v, number: %v", parent.Supply, header.Supply, blockReward, header.Number))
738-
log.Info("Block reward", "parent", toEth(parent.Supply), "current", toEth(header.Supply), "number", header.Number, "reward", toEth(blockReward))
738+
log.Info("Block reward", "parent", toCoin(parent.Supply), "current", toCoin(header.Supply), "number", header.Number, "reward", toCoin(blockReward))
739739
// Accumulate the rewards for the miner and any included uncles
740740
//if blockReward.Cmp(big0) > 0 {
741741
reward := new(big.Int).Set(blockReward)
@@ -754,7 +754,7 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header,
754754
break
755755
}
756756
state.AddBalance(uncle.Coinbase, r)
757-
log.Info("Uncle reward", "miner", uncle.Coinbase, "reward", toEth(r), "total", toEth(header.Supply))
757+
log.Info("Uncle reward", "miner", uncle.Coinbase, "reward", toCoin(r), "total", toCoin(header.Supply))
758758
//todo
759759
//r.Div(blockReward, big8)
760760
//state.AddBalance(uncle.Coinbase, r)
@@ -767,15 +767,15 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header,
767767
//header.Supply = params.CTXC_TOP
768768
break
769769
}
770-
log.Info("Nephew reward", "reward", r, "total", header.Supply)
770+
log.Info("Nephew reward", "reward", toCoin(r), "total", toCoin(header.Supply))
771771
reward.Add(reward, r)
772772
}
773773

774774
state.AddBalance(header.Coinbase, reward)
775775
}
776776
}
777777

778-
func toEth(wei *big.Int) *big.Float {
778+
func toCoin(wei *big.Int) *big.Float {
779779
return new(big.Float).Quo(new(big.Float).SetInt(wei), new(big.Float).SetInt(big.NewInt(params.Ether)))
780780
}
781781

0 commit comments

Comments
 (0)