Merge pull request #1837 from filecoin-project/feat/secstor-unseal
Update sector-storage with ReadPiece impl
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user