mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
core/vm: optimize opRandom using uint256.Int.SetBytes32
This commit is contained in:
parent
0ec63272bf
commit
58efdaf5cc
1 changed files with 1 additions and 1 deletions
|
|
@ -475,7 +475,7 @@ func opDifficulty(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func opRandom(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
|
func opRandom(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
|
||||||
v := new(uint256.Int).SetBytes(evm.Context.Random.Bytes())
|
v := new(uint256.Int).SetBytes32(evm.Context.Random.Bytes())
|
||||||
scope.Stack.push(v)
|
scope.Stack.push(v)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue