From 6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 23 Feb 2015 11:54:23 +0100 Subject: Allow zero and negative block numbers 0 is genesis block. Xeth recognises -1 as current --- rpc/args.go | 7 ------- 1 file changed, 7 deletions(-) (limited to 'rpc/args.go') diff --git a/rpc/args.go b/rpc/args.go index f730819fd..347f60410 100644 --- a/rpc/args.go +++ b/rpc/args.go @@ -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"` -- cgit v1.2.3