Validate NewTx From field is not blank

This commit is contained in:
Taylor Gerring
2015-03-18 20:30:09 -04:00
parent da427e8843
commit 8b20c3cc97
3 changed files with 40 additions and 0 deletions

View File

@ -145,6 +145,13 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
return nil
}
func (args *NewTxArgs) requirements() error {
if len(args.From) == 0 {
return NewValidationError("From", "Is required")
}
return nil
}
type GetStorageArgs struct {
Address string
BlockNumber int64