Remote wallet backends
This commit is contained in:
@@ -44,6 +44,7 @@ const (
|
||||
FullNode RepoType = iota
|
||||
StorageMiner
|
||||
Worker
|
||||
Wallet
|
||||
)
|
||||
|
||||
func defConfForType(t RepoType) interface{} {
|
||||
@@ -54,6 +55,8 @@ func defConfForType(t RepoType) interface{} {
|
||||
return config.DefaultStorageMiner()
|
||||
case Worker:
|
||||
return &struct{}{}
|
||||
case Wallet:
|
||||
return &struct{}{}
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown RepoType(%d)", int(t)))
|
||||
}
|
||||
@@ -87,6 +90,12 @@ func (fsr *FsRepo) Exists() (bool, error) {
|
||||
notexist := os.IsNotExist(err)
|
||||
if notexist {
|
||||
err = nil
|
||||
|
||||
_, err = os.Stat(filepath.Join(fsr.path, fsKeystore))
|
||||
notexist = os.IsNotExist(err)
|
||||
if notexist {
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
return !notexist, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user