mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 04:41:22 +00:00
rpc: generalized rpc using reflection on funcs and params
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
func BlockchainInfoHandler(minHeight, maxHeight uint) (uint, []*types.BlockMeta) {
|
||||
func BlockchainInfo(minHeight, maxHeight uint) (uint, []*types.BlockMeta) {
|
||||
if maxHeight == 0 {
|
||||
maxHeight = blockStore.Height()
|
||||
} else {
|
||||
@ -30,7 +30,7 @@ func BlockchainInfoHandler(minHeight, maxHeight uint) (uint, []*types.BlockMeta)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
func GetBlockHandler(height uint) (*types.BlockMeta, *types.Block, error) {
|
||||
func GetBlock(height uint) (*types.BlockMeta, *types.Block, error) {
|
||||
if height == 0 {
|
||||
return nil, nil, fmt.Errorf("height must be greater than 1")
|
||||
}
|
||||
|
Reference in New Issue
Block a user