diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 20:50:22 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 20:50:22 +0800 |
commit | cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67 (patch) | |
tree | 9d63d4aa32a4733b83c6434e999fe3da93683e6b /rpc/args.go | |
parent | a49c81547ce32125917c0127c94c9845750e9e30 (diff) | |
download | go-tangerine-cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67.tar go-tangerine-cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67.tar.gz go-tangerine-cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67.tar.bz2 go-tangerine-cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67.tar.lz go-tangerine-cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67.tar.xz go-tangerine-cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67.tar.zst go-tangerine-cd6b3fd28a0624ac27cecf9f3e331a027b9c7e67.zip |
GetDataArgs
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 30ed1a17c..2b62811e3 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -281,7 +281,7 @@ func (args *GetBalanceArgs) UnmarshalJSON(b []byte) (err error) { } type GetDataArgs struct { - Address string + Address common.Address BlockNumber int64 } @@ -299,7 +299,7 @@ func (args *GetDataArgs) UnmarshalJSON(b []byte) (err error) { if !ok { return NewInvalidTypeError("address", "not a string") } - args.Address = addstr + args.Address = common.HexToAddress(addstr) if len(obj) > 1 { if err := blockHeight(obj[1], &args.BlockNumber); err != nil { @@ -310,13 +310,6 @@ func (args *GetDataArgs) UnmarshalJSON(b []byte) (err error) { return nil } -func (args *GetDataArgs) requirements() error { - if len(args.Address) == 0 { - return NewValidationError("Address", "cannot be blank") - } - return nil -} - type BlockNumIndexArgs struct { BlockNumber int64 Index int64 |