Use HasHeader

This commit is contained in:
Ori Newman 2022-10-13 17:04:16 +03:00
parent 1ae3863e43
commit 61c805bd6b

View File

@ -37,7 +37,7 @@ func HandleGetBlocks(context *rpccontext.Context, _ *router.Router, request appm
return nil, err return nil, err
} }
if !blockInfo.Exists || blockInfo.BlockStatus == externalapi.StatusInvalid { if !blockInfo.HasHeader() {
return &appmessage.GetBlocksResponseMessage{ return &appmessage.GetBlocksResponseMessage{
Error: appmessage.RPCErrorf("Could not find lowHash %s", getBlocksRequest.LowHash), Error: appmessage.RPCErrorf("Could not find lowHash %s", getBlocksRequest.LowHash),
}, nil }, nil