better error message for unknown RPC method calls

This commit is contained in:
Jae Kwon
2015-04-01 17:12:17 -07:00
parent c74b5522a1
commit d8766e1d37
2 changed files with 7 additions and 3 deletions

View File

@ -32,7 +32,7 @@ func BlockchainInfo(minHeight, maxHeight uint) (*ResponseBlockchainInfo, error)
func GetBlock(height uint) (*ResponseGetBlock, error) {
if height == 0 {
return nil, fmt.Errorf("height must be greater than 1")
return nil, fmt.Errorf("height must be greater than 0")
}
if height > blockStore.Height() {
return nil, fmt.Errorf("height must be less than the current blockchain height")