aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-19 08:30:09 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-19 08:30:09 +0800
commit8b20c3cc976a149c64ef0ac2cabbe49e93ba739d (patch)
tree07ef5356ae58e637d676bc28b3e8659f11bdcbcf /rpc/args.go
parentda427e8843e96bcee5f4eaedde966b0b8cf09520 (diff)
downloaddexon-8b20c3cc976a149c64ef0ac2cabbe49e93ba739d.tar.gz
dexon-8b20c3cc976a149c64ef0ac2cabbe49e93ba739d.tar.zst
dexon-8b20c3cc976a149c64ef0ac2cabbe49e93ba739d.zip
Validate NewTx From field is not blank
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/rpc/args.go b/rpc/args.go
index 992ea1eed..ab1c40585 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -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