diff options
Diffstat (limited to 'eth/api.go')
-rw-r--r-- | eth/api.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/eth/api.go b/eth/api.go index 1d66f53fe..8203424ae 100644 --- a/eth/api.go +++ b/eth/api.go @@ -52,15 +52,6 @@ import ( "golang.org/x/net/context" ) -// errNoCode is returned by call and transact operations for which the requested -// recipient contract to operate on does not exist in the state db or does not -// have any code associated with it (i.e. suicided). -// -// Please note, this error string is part of the RPC API and is expected by the -// native contract bindings to signal this particular error. Do not change this -// as it will break all dependent code! -var errNoCode = errors.New("no contract code at given address") - const defaultGas = uint64(90000) // blockByNumber is a commonly used helper function which retrieves and returns @@ -717,12 +708,6 @@ func (s *PublicBlockChainAPI) doCall(args CallArgs, blockNr rpc.BlockNumber) (st } stateDb = stateDb.Copy() - // If there's no code to interact with, respond with an appropriate error - if args.To != nil { - if code := stateDb.GetCode(*args.To); len(code) == 0 { - return "0x", nil, errNoCode - } - } // Retrieve the account state object to interact with var from *state.StateObject if args.From == (common.Address{}) { @@ -1353,7 +1338,7 @@ func (s *PublicTransactionPoolAPI) SignTransaction(args SignTransactionArgs) (*S return nil, err } - return &SignTransactionResult{"0x" + common.Bytes2Hex(data), newTx(tx)}, nil + return &SignTransactionResult{"0x" + common.Bytes2Hex(data), newTx(signedTx)}, nil } // PendingTransactions returns the transactions that are in the transaction pool and have a from address that is one of |