Modity addCachePathsForSectorSize func to support 2KiB sector size devnet locally also

This commit is contained in:
chunqizhi 2020-07-06 15:08:13 +08:00
parent 4c1968f62a
commit 837aba777f

View File

@ -91,9 +91,15 @@ func (m *Manager) CheckProvable(ctx context.Context, spt abi.RegisteredSealProof
func addCachePathsForSectorSize(chk map[string]int64, cacheDir string, ssize abi.SectorSize) {
switch ssize {
case 2 << 10:
fallthrough
case 8 << 20:
fallthrough
case 512 << 20:
chk[filepath.Join(cacheDir, "sc-02-data-tree-r-last.dat")] = 0
case 32 << 30:
fallthrough
case 64 << 30:
for i := 0; i < 8; i++ {
chk[filepath.Join(cacheDir, fmt.Sprintf("sc-02-data-tree-r-last-%d.dat", i))] = 0
}