mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 02:10:46 +00:00
fix: owner and foundation same address for reward (#1024)
Co-authored-by: liam.lai <liam.lai@us>
This commit is contained in:
parent
d25c6f02a7
commit
3cea40cf9d
1 changed files with 6 additions and 1 deletions
|
|
@ -466,7 +466,12 @@ func GetRewardBalancesRate(foundationWalletAddr common.Address, statedb *state.S
|
||||||
|
|
||||||
foundationReward := new(big.Int).Mul(totalReward, new(big.Int).SetInt64(common.RewardFoundationPercent))
|
foundationReward := new(big.Int).Mul(totalReward, new(big.Int).SetInt64(common.RewardFoundationPercent))
|
||||||
foundationReward = new(big.Int).Div(foundationReward, new(big.Int).SetInt64(100))
|
foundationReward = new(big.Int).Div(foundationReward, new(big.Int).SetInt64(100))
|
||||||
balances[foundationWalletAddr] = foundationReward
|
|
||||||
|
if balances[foundationWalletAddr] != nil {
|
||||||
|
balances[foundationWalletAddr].Add(balances[foundationWalletAddr], foundationReward)
|
||||||
|
} else {
|
||||||
|
balances[foundationWalletAddr] = foundationReward
|
||||||
|
}
|
||||||
|
|
||||||
jsonHolders, err := json.Marshal(balances)
|
jsonHolders, err := json.Marshal(balances)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue