diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 19:47:00 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 19:47:00 +0800 |
commit | 4523a00b91dbe98c6cb03acef362c5592973bcd3 (patch) | |
tree | 207aa9b3827cbf243d8f739e71a16c53ccbfe048 /rpc/args.go | |
parent | 9c4504dc41bbedb590db20519030224df66ce4b1 (diff) | |
download | go-tangerine-4523a00b91dbe98c6cb03acef362c5592973bcd3.tar go-tangerine-4523a00b91dbe98c6cb03acef362c5592973bcd3.tar.gz go-tangerine-4523a00b91dbe98c6cb03acef362c5592973bcd3.tar.bz2 go-tangerine-4523a00b91dbe98c6cb03acef362c5592973bcd3.tar.lz go-tangerine-4523a00b91dbe98c6cb03acef362c5592973bcd3.tar.xz go-tangerine-4523a00b91dbe98c6cb03acef362c5592973bcd3.tar.zst go-tangerine-4523a00b91dbe98c6cb03acef362c5592973bcd3.zip |
GetTxCountArgs
Diffstat (limited to 'rpc/args.go')
-rw-r--r-- | rpc/args.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/rpc/args.go b/rpc/args.go index 84c9ee0f7..93af3258f 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -221,7 +221,7 @@ func (args *GetStorageAtArgs) UnmarshalJSON(b []byte) (err error) { } type GetTxCountArgs struct { - Address string + Address common.Address BlockNumber int64 } @@ -239,7 +239,7 @@ func (args *GetTxCountArgs) UnmarshalJSON(b []byte) (err error) { if !ok { return NewDecodeParamError("Address is not a string") } - args.Address = addstr + args.Address = common.HexToAddress(addstr) if len(obj) > 1 { if err := blockHeight(obj[1], &args.BlockNumber); err != nil { @@ -250,13 +250,6 @@ func (args *GetTxCountArgs) UnmarshalJSON(b []byte) (err error) { return nil } -func (args *GetTxCountArgs) requirements() error { - if len(args.Address) == 0 { - return NewValidationError("Address", "cannot be blank") - } - return nil -} - type GetBalanceArgs struct { Address string BlockNumber int64 |