diff options
author | zsfelfoldi <zsfelfoldi@gmail.com> | 2015-03-31 14:28:12 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-04-20 03:57:48 +0800 |
commit | 3136bae4a5f08820d3116b61b783c100c169717c (patch) | |
tree | 9295831c571081061a67dd1d670490924e114c22 /rpc | |
parent | 97a602864a485bb3a79f460077052bd76cdbff99 (diff) | |
download | go-tangerine-3136bae4a5f08820d3116b61b783c100c169717c.tar.gz go-tangerine-3136bae4a5f08820d3116b61b783c100c169717c.tar.zst go-tangerine-3136bae4a5f08820d3116b61b783c100c169717c.zip |
NatSpec, URL register storage retrieval
fixed 2/3 tests
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/api.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go index bf5066f9a..c02b03fb6 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -2,7 +2,7 @@ package rpc import ( "encoding/json" - // "fmt" + "fmt" "math/big" "sync" @@ -167,6 +167,15 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err return err } + // call ConfirmTransaction first + var obj []json.RawMessage + if err := json.Unmarshal(req.Params, &obj); err != nil { + return NewDecodeParamError(err.Error()) + } + if !api.xeth().ConfirmTransaction(string(obj[0])) { + return fmt.Errorf("Transaction not confirmed") + } + v, err := api.xeth().Transact(args.From, args.To, args.Value.String(), args.Gas.String(), args.GasPrice.String(), args.Data) if err != nil { return err |