From b3f943898eb92a550f5b1223d80cfb2c6b290e8f Mon Sep 17 00:00:00 2001 From: DinhLN Date: Thu, 16 Aug 2018 16:43:30 +0700 Subject: [PATCH] Fixed reward overflow uint64. --- eth/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/backend.go b/eth/backend.go index 1949bc301c75..e6f2b3b3859d 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -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 {