Merge pull request #136 from dinhln89/master

Fixed reward overflow uint64.
This commit is contained in:
DinhLN 2018-08-16 16:45:14 +07:00 committed by GitHub
commit c5bcaf47d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {