mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
core/vm: optimize opBlockhash using uint256.SetBytes32
This commit is contained in:
parent
0ec63272bf
commit
7694b25e8f
1 changed files with 1 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ func opBlockhash(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
|
||||||
if tracer := evm.Config.Tracer; tracer != nil && tracer.OnBlockHashRead != nil {
|
if tracer := evm.Config.Tracer; tracer != nil && tracer.OnBlockHashRead != nil {
|
||||||
tracer.OnBlockHashRead(num64, res)
|
tracer.OnBlockHashRead(num64, res)
|
||||||
}
|
}
|
||||||
num.SetBytes(res[:])
|
num.SetBytes32(res[:])
|
||||||
} else {
|
} else {
|
||||||
num.Clear()
|
num.Clear()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue