mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
Use big.Int#Set instead of big.Int#SetBytes when possible (#896)
There is no reason to make the bytes transformation and back to big int to assign a big int to another one. The `Set` method should be used instead.
This commit is contained in:
parent
4d23e6de33
commit
891ec7fef6
1 changed files with 2 additions and 2 deletions
|
|
@ -381,8 +381,8 @@ func (st *StateTransition) TransitionDb(interruptCtx context.Context) (*Executio
|
|||
if !st.noFeeBurnAndTip {
|
||||
st.state.AddBalance(st.evm.Context.Coinbase, amount)
|
||||
|
||||
output1 := new(big.Int).SetBytes(input1.Bytes())
|
||||
output2 := new(big.Int).SetBytes(input2.Bytes())
|
||||
output1 := new(big.Int).Set(input1)
|
||||
output2 := new(big.Int).Set(input2)
|
||||
|
||||
// Deprecating transfer log and will be removed in future fork. PLEASE DO NOT USE this transfer log going forward. Parameters won't get updated as expected going forward with EIP1559
|
||||
// add transfer log
|
||||
|
|
|
|||
Loading…
Reference in a new issue