fix: add TIP condition for reward bug fix (#1360)

Co-authored-by: liam.lai <liam.lai@us>
This commit is contained in:
benjamin202410 2025-08-20 01:25:44 -07:00 committed by GitHub
parent d7412ea981
commit 3e43756fd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -467,7 +467,7 @@ func GetRewardBalancesRate(foundationWalletAddr common.Address, statedb *state.S
foundationReward := new(big.Int).Mul(totalReward, new(big.Int).SetInt64(common.RewardFoundationPercent))
foundationReward = new(big.Int).Div(foundationReward, new(big.Int).SetInt64(100))
if balances[foundationWalletAddr] != nil {
if blockNumber >= common.TIPUpgradeReward.Uint64() && balances[foundationWalletAddr] != nil {
balances[foundationWalletAddr].Add(balances[foundationWalletAddr], foundationReward)
} else {
balances[foundationWalletAddr] = foundationReward