From 61c805bd6bd46ebb017c3170b7e762c5f6de2128 Mon Sep 17 00:00:00 2001 From: Ori Newman Date: Thu, 13 Oct 2022 17:04:16 +0300 Subject: [PATCH] Use HasHeader --- app/rpc/rpchandlers/get_blocks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/rpc/rpchandlers/get_blocks.go b/app/rpc/rpchandlers/get_blocks.go index 2bb8b0834..eb45fab01 100644 --- a/app/rpc/rpchandlers/get_blocks.go +++ b/app/rpc/rpchandlers/get_blocks.go @@ -37,7 +37,7 @@ func HandleGetBlocks(context *rpccontext.Context, _ *router.Router, request appm return nil, err } - if !blockInfo.Exists || blockInfo.BlockStatus == externalapi.StatusInvalid { + if !blockInfo.HasHeader() { return &appmessage.GetBlocksResponseMessage{ Error: appmessage.RPCErrorf("Could not find lowHash %s", getBlocksRequest.LowHash), }, nil