StatusFail bool `json:"status_fail"`
}
-// GetBlockReq is used to handle getBlock req
-type GetBlockReq struct {
+// BlockReq is used to handle getBlock req
+type BlockReq struct {
BlockHeight uint64 `json:"block_height"`
BlockHash chainjson.HexBytes `json:"block_hash"`
}
}
// return block by hash
-func (a *API) getBlock(ins GetBlockReq) Response {
+func (a *API) getBlock(ins BlockReq) Response {
var err error
block := &types.Block{}
if len(ins.BlockHash) == 32 {
Reward uint64 `json:"reward"`
}
-func (a *API) getBlockHeader(ins GetBlockReq) Response {
+func (a *API) getBlockHeader(ins BlockReq) Response {
var err error
block := &types.Block{}
if len(ins.BlockHash) == 32 {