aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 20:10:31 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-26 20:10:31 +0800
commitc139af582663d760f58e7b50dcb9f355c47ef47e (patch)
tree3c810319da3bc6e5b67bf34317ddbd1e0b0bfb56 /rpc/args.go
parent4523a00b91dbe98c6cb03acef362c5592973bcd3 (diff)
downloadgo-tangerine-c139af582663d760f58e7b50dcb9f355c47ef47e.tar
go-tangerine-c139af582663d760f58e7b50dcb9f355c47ef47e.tar.gz
go-tangerine-c139af582663d760f58e7b50dcb9f355c47ef47e.tar.bz2
go-tangerine-c139af582663d760f58e7b50dcb9f355c47ef47e.tar.lz
go-tangerine-c139af582663d760f58e7b50dcb9f355c47ef47e.tar.xz
go-tangerine-c139af582663d760f58e7b50dcb9f355c47ef47e.tar.zst
go-tangerine-c139af582663d760f58e7b50dcb9f355c47ef47e.zip
GetBalanceArgs
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/rpc/args.go b/rpc/args.go
index 93af3258f..81343dd01 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -251,7 +251,7 @@ func (args *GetTxCountArgs) UnmarshalJSON(b []byte) (err error) {
}
type GetBalanceArgs struct {
- Address string
+ Address common.Address
BlockNumber int64
}
@@ -269,7 +269,7 @@ func (args *GetBalanceArgs) 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 {
@@ -280,13 +280,6 @@ func (args *GetBalanceArgs) UnmarshalJSON(b []byte) (err error) {
return nil
}
-func (args *GetBalanceArgs) requirements() error {
- if len(args.Address) == 0 {
- return NewValidationError("Address", "cannot be blank")
- }
- return nil
-}
-
type GetDataArgs struct {
Address string
BlockNumber int64