all: prefer new(big.Int) over big.NewInt(0) (#25087)

minor performance improvement: `big.NewInt(0).Xxx` -> `new(big.Int).Xxx`
This commit is contained in:
lmittmann
2022-06-14 15:09:48 +03:00
committed by GitHub
parent 8cfd1214b7
commit bc013bc42e
12 changed files with 22 additions and 24 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
minerReward.Add(minerReward, perOmmer)
// Add (8-delta)/8
reward := big.NewInt(8)
reward.Sub(reward, big.NewInt(0).SetUint64(ommer.Delta))
reward.Sub(reward, new(big.Int).SetUint64(ommer.Delta))
reward.Mul(reward, blockReward)
reward.Div(reward, big.NewInt(8))
statedb.AddBalance(ommer.Address, reward)