diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-21 00:09:10 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-21 00:09:10 +0800 |
commit | 3b45fedb81dade6fc65c663c76856a07261f30d0 (patch) | |
tree | 94c9d0a98b625ca5a8be59f5b780fd3bd54254c7 /rpc/api.go | |
parent | 76025cc4245f0abc0749f4d1e433be865107bf24 (diff) | |
parent | 36ec42e50c9367e86621ff58b8e3d835abbbad79 (diff) | |
download | go-tangerine-3b45fedb81dade6fc65c663c76856a07261f30d0.tar go-tangerine-3b45fedb81dade6fc65c663c76856a07261f30d0.tar.gz go-tangerine-3b45fedb81dade6fc65c663c76856a07261f30d0.tar.bz2 go-tangerine-3b45fedb81dade6fc65c663c76856a07261f30d0.tar.lz go-tangerine-3b45fedb81dade6fc65c663c76856a07261f30d0.tar.xz go-tangerine-3b45fedb81dade6fc65c663c76856a07261f30d0.tar.zst go-tangerine-3b45fedb81dade6fc65c663c76856a07261f30d0.zip |
Merge branch 'ethersphere-frontier/natspec' into develop
Diffstat (limited to 'rpc/api.go')
-rw-r--r-- | rpc/api.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go index bf5066f9a..66283752b 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,12 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err return err } + // call ConfirmTransaction first + tx, _ := json.Marshal(req) + if !api.xeth().ConfirmTransaction(string(tx)) { + 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 |