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/args.go | |
parent | aa884c052ddf7c5e8f673972b34681982de1cd52 (diff) | |
download | go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar.gz go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar.bz2 go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar.lz go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar.xz go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.tar.zst go-tangerine-03bb88dec0163abd99d0fd6c86ab5852c59669cb.zip |
xeth, rpc: added nonce setting through RPC and xeth transact
Diffstat (limited to 'rpc/args.go')
-rw-r--r-- | rpc/args.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rpc/args.go b/rpc/args.go index 4bd48e6d6..e61f28c4f 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -157,6 +157,7 @@ func (args *GetBlockByNumberArgs) UnmarshalJSON(b []byte) (err error) { type NewTxArgs struct { From string To string + Nonce *big.Int Value *big.Int Gas *big.Int GasPrice *big.Int @@ -170,6 +171,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) { var ext struct { From string To string + Nonce interface{} Value interface{} Gas interface{} GasPrice interface{} @@ -200,6 +202,14 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) { args.Data = ext.Data var num *big.Int + if ext.Nonce != nil { + num, err = numString(ext.Nonce) + if err != nil { + return err + } + } + args.Nonce = num + if ext.Value == nil { num = big.NewInt(0) } else { |