mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
consensus/ubqhash: be careful with pointers and block rewards
This commit is contained in:
parent
43f49607e0
commit
39b316e679
1 changed files with 2 additions and 2 deletions
|
|
@ -621,7 +621,7 @@ func CalcBaseBlockReward(config *params.UbqhashConfig, height *big.Int) *big.Int
|
|||
|
||||
for _, step := range config.MonetaryPolicy {
|
||||
if height.Cmp(step.Block) > 0 {
|
||||
reward = step.Reward
|
||||
reward = new(big.Int).Set(step.Reward)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -656,7 +656,7 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header
|
|||
// Uncle reward step down fix. (activates along-side byzantium)
|
||||
ufixReward := new(big.Int).Set(ubqhashConfig.BlockReward)
|
||||
if config.IsByzantium(header.Number) {
|
||||
ufixReward = reward
|
||||
ufixReward = new(big.Int).Set(reward)
|
||||
}
|
||||
|
||||
for _, uncle := range uncles {
|
||||
|
|
|
|||
Loading…
Reference in a new issue