mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert unnecessary changes
This commit is contained in:
parent
681f566af3
commit
ffa4817399
3 changed files with 1 additions and 7 deletions
|
|
@ -286,8 +286,6 @@ func (s *StateDB) GetState(addr common.Address, hash common.Hash) common.Hash {
|
|||
stateObject := s.getStateObject(addr)
|
||||
if stateObject != nil {
|
||||
return stateObject.GetState(s.db, hash)
|
||||
} else {
|
||||
log.Info("No state object")
|
||||
}
|
||||
return common.Hash{}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -392,8 +392,8 @@ func hashSha3(data []byte) []byte {
|
|||
hasher.Write(data)
|
||||
hasher.Read(hasherBuf[:])
|
||||
return hasherBuf
|
||||
|
||||
}
|
||||
|
||||
func opSha3(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
||||
offset, size := stack.pop(), stack.pop()
|
||||
data := memory.GetPtr(offset.Int64(), size.Int64())
|
||||
|
|
@ -640,14 +640,12 @@ func opSload(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory
|
|||
loc := stack.peek()
|
||||
val := interpreter.evm.StateDB.GetState(contract.Address(), common.BigToHash(loc))
|
||||
loc.SetBytes(val.Bytes())
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func opSstore(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
||||
loc := common.BigToHash(stack.pop())
|
||||
val := stack.pop()
|
||||
|
||||
interpreter.evm.StateDB.SetState(contract.Address(), loc, common.BigToHash(val))
|
||||
|
||||
interpreter.intPool.put(val)
|
||||
|
|
@ -768,7 +766,6 @@ func opCall(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory
|
|||
addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop()
|
||||
toAddr := common.BigToAddress(addr)
|
||||
value = math.U256(value)
|
||||
|
||||
// Get the arguments from the memory.
|
||||
args := memory.GetPtr(inOffset.Int64(), inSize.Int64())
|
||||
methodId := args[0:4]
|
||||
|
|
|
|||
|
|
@ -1126,7 +1126,6 @@ func newFrontierInstructionSet() JumpTable {
|
|||
memorySize: memoryCall,
|
||||
valid: true,
|
||||
returns: true,
|
||||
writes: true,
|
||||
},
|
||||
CALLCODE: {
|
||||
execute: opCallCode,
|
||||
|
|
|
|||
Loading…
Reference in a new issue