Merge PR #2656: Revert read-only leveldb database

* Revert read-only leveldb database

Waiting on a fix for syndtr/goleveldb#240.

* Update client/keys/utils.go
This commit is contained in:
Alessio Treglia 2018-11-01 23:29:21 +00:00 committed by Christopher Goes
parent c5238b0d1e
commit 3657ff4ada
1 changed files with 6 additions and 1 deletions

View File

@ -96,7 +96,12 @@ func GetKeyBaseFromDirWithWritePerm(rootDir string) (keys.Keybase, error) {
// GetKeyBaseFromDir initializes a read-only keybase at a particular dir.
func GetKeyBaseFromDir(rootDir string) (keys.Keybase, error) {
return getKeyBaseFromDirWithOpts(rootDir, &opt.Options{ReadOnly: true})
// Disabled because of the inability to create a new keys database directory
// in the instance of when ReadOnly is set to true.
//
// ref: syndtr/goleveldb#240
// return getKeyBaseFromDirWithOpts(rootDir, &opt.Options{ReadOnly: true})
return getKeyBaseFromDirWithOpts(rootDir, nil)
}
func getKeyBaseFromDirWithOpts(rootDir string, o *opt.Options) (keys.Keybase, error) {