aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/rpc/args.go b/rpc/args.go
index cebabf4ba..4bc36f5d9 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -36,6 +36,8 @@ func blockHeight(raw interface{}, number *int64) error {
}
switch str {
+ case "earliest":
+ *number = 0
case "latest":
*number = -1
case "pending":
@@ -277,11 +279,6 @@ func (args *CallArgs) UnmarshalJSON(b []byte) (err error) {
return NewDecodeParamError(err.Error())
}
- if len(ext.From) == 0 {
- return NewValidationError("from", "is required")
- }
- args.From = ext.From
-
if len(ext.To) == 0 {
return NewValidationError("to", "is required")
}