Skip to content

Commit

Permalink
Fixed reward overflow uint64.
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhln89 committed Aug 16, 2018
1 parent f9d15d7 commit b3f9438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
if number > 0 && number-rCheckpoint > 0 {
// Get signers in blockSigner smartcontract.
addr := common.HexToAddress(common.BlockSigners)
chainReward := new(big.Int).SetUint64(chain.Config().Clique.Reward * params.Ether)
chainReward := new(big.Int).Mul(new(big.Int).SetUint64(chain.Config().Clique.Reward), new(big.Int).SetUint64(params.Ether))
totalSigner := new(uint64)
signers, err := contracts.GetRewardForCheckpoint(chain, addr, number, rCheckpoint, client, totalSigner)
if err != nil {
Expand Down

0 comments on commit b3f9438

Please sign in to comment.