Merge pull request #1837 from filecoin-project/feat/secstor-unseal

Update sector-storage with ReadPiece impl
This commit is contained in:
Łukasz Magiera
2020-05-29 20:36:40 +02:00
committed by GitHub
12 changed files with 71 additions and 36 deletions
+1
View File
@@ -107,6 +107,7 @@ func DefaultStorageMiner() *StorageMiner {
AllowPreCommit1: true,
AllowPreCommit2: true,
AllowCommit: true,
AllowUnseal: true,
},
}
cfg.Common.API.ListenAddress = "/ip4/127.0.0.1/tcp/2345/http"
+4
View File
@@ -319,6 +319,10 @@ func (fsr *fsLockedRepo) SetStorage(c func(*stores.StorageConfig)) error {
return config.WriteStorageFile(fsr.join(fsStorageConfig), sc)
}
func (fsr *fsLockedRepo) Stat(path string) (stores.FsStat, error) {
return stores.Stat(path)
}
func (fsr *fsLockedRepo) SetAPIEndpoint(ma multiaddr.Multiaddr) error {
if err := fsr.stillValid(); err != nil {
return err
+1
View File
@@ -40,6 +40,7 @@ type LockedRepo interface {
GetStorage() (stores.StorageConfig, error)
SetStorage(func(*stores.StorageConfig)) error
Stat(path string) (stores.FsStat, error)
// SetAPIEndpoint sets the endpoint of the current API
// so it can be read by API clients
+4
View File
@@ -61,6 +61,10 @@ func (lmem *lockedMemRepo) SetStorage(c func(*stores.StorageConfig)) error {
return nil
}
func (lmem *lockedMemRepo) Stat(path string) (stores.FsStat, error) {
return stores.Stat(path)
}
func (lmem *lockedMemRepo) Path() string {
lmem.Lock()
defer lmem.Unlock()