go fmt
This commit is contained in:
parent
793d332002
commit
6fe92ff13c
@ -55,7 +55,7 @@ func NewLocalWorker(wcfg WorkerConfig, store stores.Store, local *stores.Local,
|
|||||||
}
|
}
|
||||||
|
|
||||||
type localWorkerPathProvider struct {
|
type localWorkerPathProvider struct {
|
||||||
w *LocalWorker
|
w *LocalWorker
|
||||||
op stores.AcquireMode
|
op stores.AcquireMode
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ func (l *LocalWorker) UnsealPiece(ctx context.Context, sector abi.SectorID, inde
|
|||||||
return xerrors.Errorf("unsealing sector: %w", err)
|
return xerrors.Errorf("unsealing sector: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := l.storage.RemoveCopies(ctx, sector, stores.FTSealed | stores.FTCache); err != nil {
|
if err := l.storage.RemoveCopies(ctx, sector, stores.FTSealed|stores.FTCache); err != nil {
|
||||||
return xerrors.Errorf("removing source data: %w", err)
|
return xerrors.Errorf("removing source data: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,9 +278,9 @@ func (i *Index) StorageFindSector(ctx context.Context, s abi.SectorID, ft Sector
|
|||||||
}
|
}
|
||||||
|
|
||||||
out = append(out, SectorStorageInfo{
|
out = append(out, SectorStorageInfo{
|
||||||
ID: id,
|
ID: id,
|
||||||
URLs: urls,
|
URLs: urls,
|
||||||
Weight: st.info.Weight * n, // storage with more sector types is better
|
Weight: st.info.Weight * n, // storage with more sector types is better
|
||||||
|
|
||||||
CanSeal: st.info.CanSeal,
|
CanSeal: st.info.CanSeal,
|
||||||
CanStore: st.info.CanStore,
|
CanStore: st.info.CanStore,
|
||||||
@ -307,9 +307,9 @@ func (i *Index) StorageFindSector(ctx context.Context, s abi.SectorID, ft Sector
|
|||||||
}
|
}
|
||||||
|
|
||||||
out = append(out, SectorStorageInfo{
|
out = append(out, SectorStorageInfo{
|
||||||
ID: id,
|
ID: id,
|
||||||
URLs: urls,
|
URLs: urls,
|
||||||
Weight: st.info.Weight * 0, // TODO: something better than just '0'
|
Weight: st.info.Weight * 0, // TODO: something better than just '0'
|
||||||
|
|
||||||
CanSeal: st.info.CanSeal,
|
CanSeal: st.info.CanSeal,
|
||||||
CanStore: st.info.CanStore,
|
CanStore: st.info.CanStore,
|
||||||
|
@ -10,12 +10,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type PathType bool
|
type PathType bool
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PathStorage = false
|
PathStorage = false
|
||||||
PathSealing = true
|
PathSealing = true
|
||||||
)
|
)
|
||||||
|
|
||||||
type AcquireMode string
|
type AcquireMode string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AcquireMove = "move"
|
AcquireMove = "move"
|
||||||
AcquireCopy = "copy"
|
AcquireCopy = "copy"
|
||||||
|
@ -16,7 +16,7 @@ const pathSize = 16 << 20
|
|||||||
|
|
||||||
type TestingLocalStorage struct {
|
type TestingLocalStorage struct {
|
||||||
root string
|
root string
|
||||||
c StorageConfig
|
c StorageConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TestingLocalStorage) GetStorage() (StorageConfig, error) {
|
func (t *TestingLocalStorage) GetStorage() (StorageConfig, error) {
|
||||||
@ -63,7 +63,6 @@ func (t *TestingLocalStorage) init(subpath string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var _ LocalStorage = &TestingLocalStorage{}
|
var _ LocalStorage = &TestingLocalStorage{}
|
||||||
|
|
||||||
func TestLocalStorage(t *testing.T) {
|
func TestLocalStorage(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user