diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-06 05:08:52 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-07 00:30:55 +0800 |
commit | 03bb88dec0163abd99d0fd6c86ab5852c59669cb (patch) | |
tree | b6c00cb55db2912fdb1c86416204aa59ab9298b5 /rpc/api.go | |
parent | aa884c052ddf7c5e8f673972b34681982de1cd52 (diff) | |
download | go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar.gz go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar.zst go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.zip |
xeth, rpc: added nonce setting through RPC and xeth transact
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 6d3a20bfa..b79a1306e 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -173,7 +173,13 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err 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) + // nonce may be nil ("guess" mode) + var nonce string + if args.Nonce != nil { + nonce = args.Nonce.String() + } + + v, err := api.xeth().Transact(args.From, args.To, nonce, args.Value.String(), args.Gas.String(), args.GasPrice.String(), args.Data) if err != nil { return err } |