diff --git a/process/block/baseProcess.go b/process/block/baseProcess.go index e29f507661..2168c9a7bc 100644 --- a/process/block/baseProcess.go +++ b/process/block/baseProcess.go @@ -635,6 +635,7 @@ func (bp *baseProcessor) sortHeadersForCurrentBlockByNonce(usedInBlock bool) (ma } if bp.hasMissingProof(headerInfo, hdrHash) { + bp.hdrsForCurrBlock.mutHdrsForBlock.RUnlock() return nil, fmt.Errorf("%w for header with hash %s", process.ErrMissingHeaderProof, hex.EncodeToString([]byte(hdrHash))) } @@ -660,6 +661,7 @@ func (bp *baseProcessor) sortHeaderHashesForCurrentBlockByNonce(usedInBlock bool } if bp.hasMissingProof(headerInfo, metaBlockHash) { + bp.hdrsForCurrBlock.mutHdrsForBlock.RUnlock() return nil, fmt.Errorf("%w for header with hash %s", process.ErrMissingHeaderProof, hex.EncodeToString([]byte(metaBlockHash))) }