cmd/geth: make account commands not require datadir lock (#27084)
Makes the `geth account ... ` commands usable even if a geth-process is already executing, since the account commands do not read the chaindata, it was not required for those to use the same locking mechanism. --- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Martin Holst Swende <martin@swende.se> Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
This commit is contained in:
co-authored by
Martin Holst Swende
Sina Mahmoodi
parent
66c0c4e517
commit
8f373227ac
+3
-3
@@ -448,10 +448,10 @@ func (c *Config) KeyDirConfig() (string, error) {
|
||||
return keydir, err
|
||||
}
|
||||
|
||||
// getKeyStoreDir retrieves the key directory and will create
|
||||
// GetKeyStoreDir retrieves the key directory and will create
|
||||
// and ephemeral one if necessary.
|
||||
func getKeyStoreDir(conf *Config) (string, bool, error) {
|
||||
keydir, err := conf.KeyDirConfig()
|
||||
func (c *Config) GetKeyStoreDir() (string, bool, error) {
|
||||
keydir, err := c.KeyDirConfig()
|
||||
if err != nil {
|
||||
return "", false, err
|
||||
}
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ func New(conf *Config) (*Node, error) {
|
||||
if err := node.openDataDir(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
keyDir, isEphem, err := getKeyStoreDir(conf)
|
||||
keyDir, isEphem, err := conf.GetKeyStoreDir()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user