rpc: return an unsupported error when "pending" was used to create a filter
This commit is contained in:
@ -714,6 +714,13 @@ func (args *BlockFilterArgs) UnmarshalJSON(b []byte) (err error) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if num == -2 {
|
||||
return fmt.Errorf("\"pending\" is unsupported")
|
||||
} else if num < -2 {
|
||||
return fmt.Errorf("Invalid to block number")
|
||||
}
|
||||
|
||||
args.Latest = num
|
||||
|
||||
if obj[0].Limit == nil {
|
||||
|
Reference in New Issue
Block a user