fix corruption detector, smallest block is 74 bytes, not 78

This commit is contained in:
Larry Ruane 2020-05-22 08:03:54 -06:00 committed by Larry Ruane
parent 1dbe4691a5
commit b47c0ddf99
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ func NewBlockCache(dbPath string, chainName string, startHeight int, redownload
break
}
length := binary.LittleEndian.Uint32(lengths[i*4 : (i+1)*4])
if length < 78 || length > 4*1000*1000 {
if length < 74 || length > 4*1000*1000 {
Log.Warning("lengths file has impossible value ", length)
c.recoverFromCorruption(c.nextBlock)
break