diff --git a/core/state/statedb.go b/core/state/statedb.go index 02851508c2..085f2379fb 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -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{} } diff --git a/core/vm/instructions.go b/core/vm/instructions.go index c0caaf4626..4a5a7549b6 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -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] diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index 88ed82ac11..b26b55284c 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -1126,7 +1126,6 @@ func newFrontierInstructionSet() JumpTable { memorySize: memoryCall, valid: true, returns: true, - writes: true, }, CALLCODE: { execute: opCallCode,