lotus-miner backup command
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"go.uber.org/fx"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/lib/backupds"
|
||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||
"github.com/filecoin-project/lotus/node/repo"
|
||||
)
|
||||
@@ -27,5 +28,10 @@ func KeyStore(lr repo.LockedRepo) (types.KeyStore, error) {
|
||||
}
|
||||
|
||||
func Datastore(r repo.LockedRepo) (dtypes.MetadataDS, error) {
|
||||
return r.Datastore("/metadata")
|
||||
mds, err := r.Datastore("/metadata")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return backupds.Wrap(mds), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user