mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
simplified
This commit is contained in:
parent
80753ba147
commit
5028d55fad
1 changed files with 5 additions and 7 deletions
|
|
@ -964,10 +964,9 @@ func opPush1(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
|
||||||
)
|
)
|
||||||
*pc += 1
|
*pc += 1
|
||||||
if *pc < codeLen {
|
if *pc < codeLen {
|
||||||
scope.Stack.push(integer.SetUint64(uint64(scope.Contract.Code[*pc])))
|
integer.SetUint64(uint64(scope.Contract.Code[*pc]))
|
||||||
} else {
|
|
||||||
scope.Stack.push(integer.Clear())
|
|
||||||
}
|
}
|
||||||
|
scope.Stack.push(integer)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -978,12 +977,11 @@ func opPush2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
|
||||||
integer = new(uint256.Int)
|
integer = new(uint256.Int)
|
||||||
)
|
)
|
||||||
if *pc+2 < codeLen {
|
if *pc+2 < codeLen {
|
||||||
scope.Stack.push(integer.SetBytes2(scope.Contract.Code[*pc+1 : *pc+3]))
|
integer.SetBytes2(scope.Contract.Code[*pc+1 : *pc+3])
|
||||||
} else if *pc+1 < codeLen {
|
} else if *pc+1 < codeLen {
|
||||||
scope.Stack.push(integer.SetUint64(uint64(scope.Contract.Code[*pc+1]) << 8))
|
integer.SetUint64(uint64(scope.Contract.Code[*pc+1]) << 8)
|
||||||
} else {
|
|
||||||
scope.Stack.push(integer.Clear())
|
|
||||||
}
|
}
|
||||||
|
scope.Stack.push(integer)
|
||||||
*pc += 2
|
*pc += 2
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue