Use blockStatusStore instead of blockStore in missingBlockBodyHashes. (#1814)

This commit is contained in:
stasatdaglabs 2021-08-05 09:45:09 +03:00 committed by GitHub
parent d748089a14
commit 2de68f43f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,12 +134,11 @@ func (sm *syncManager) missingBlockBodyHashes(stagingArea *model.StagingArea, hi
if err != nil { if err != nil {
return nil, err return nil, err
} }
hasBlock, err := sm.blockStore.HasBlock(sm.databaseContext, stagingArea, selectedChild) blockStatus, err := sm.blockStatusStore.Get(sm.databaseContext, stagingArea, selectedChild)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if blockStatus == externalapi.StatusHeaderOnly {
if !hasBlock {
foundHeaderOnlyBlock = true foundHeaderOnlyBlock = true
break break
} }