Skip to content

Commit

Permalink
fix path account management (#291)
Browse files Browse the repository at this point in the history
* fix path account management

* lint fix

* delete default path

* lint fix
  • Loading branch information
dusannosovic-ethernal authored Jun 21, 2024
1 parent 4dd7d2e commit d38f1bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions accounts/keystore/keystore.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"crypto/ecdsa"
"errors"
"fmt"
"path/filepath"
"reflect"
"sync"
"time"
Expand All @@ -24,8 +23,6 @@ var (
// ErrAccountAlreadyExists is returned if an account attempted to import is
// already present in the keystore.
ErrAccountAlreadyExists = errors.New("account already exists")

DefaultStorage, _ = filepath.Abs(filepath.Join("data-storage")) //nolint:gocritic
)

var KeyStoreType = reflect.TypeOf(&KeyStore{})
Expand Down
6 changes: 5 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,11 @@ func NewServer(config *Config) (*Server, error) {

// setup account manager
{
keystore, err := keystore.NewKeyStore(keystore.DefaultStorage, keystore.LightScryptN, keystore.LightScryptP, m.logger)
keystore, err := keystore.NewKeyStore(
filepath.Join(config.DataDir, "account-store"),
keystore.LightScryptN,
keystore.LightScryptP,
m.logger)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit d38f1bd

Please sign in to comment.