diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-23 18:54:23 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-02-23 18:54:23 +0800 |
commit | 6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1 (patch) | |
tree | d63243bec273cf08743092d40023e0a87955892d /rpc/args.go | |
parent | dd086791acf477da7641c168f82de70ed0b2dca6 (diff) | |
download | go-tangerine-6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1.tar go-tangerine-6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1.tar.gz go-tangerine-6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1.tar.bz2 go-tangerine-6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1.tar.lz go-tangerine-6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1.tar.xz go-tangerine-6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1.tar.zst go-tangerine-6fd894aae00c8c0f9f33eae7353dd9afd97f4fa1.zip |
Allow zero and negative block numbers
0 is genesis block. Xeth recognises -1 as current
Diffstat (limited to 'rpc/args.go')
-rw-r--r-- | rpc/args.go | 7 |
1 files changed, 0 insertions, 7 deletions
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"` |