GetTxCountArgs

This commit is contained in:
Taylor Gerring
2015-03-26 12:47:00 +01:00
parent 9c4504dc41
commit 4523a00b91
3 changed files with 57 additions and 23 deletions

View File

@ -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