Allow zero and negative block numbers
0 is genesis block. Xeth recognises -1 as current
This commit is contained in:
@ -22,13 +22,6 @@ func (obj *GetBlockArgs) UnmarshalJSON(b []byte) (err error) {
|
||||
return NewErrorResponse(ErrorDecodeArgs)
|
||||
}
|
||||
|
||||
func (obj *GetBlockArgs) requirements() error {
|
||||
if obj.BlockNumber == 0 && obj.Hash == "" {
|
||||
return NewErrorResponse("GetBlock requires either a block 'number' or a block 'hash' as argument")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type NewTxArgs struct {
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
|
Reference in New Issue
Block a user