accounts/keystore: prevent key-loading in geth account new#15522
Closed
holiman wants to merge 2 commits into
Closed
accounts/keystore: prevent key-loading in geth account new#15522holiman wants to merge 2 commits into
geth account new#15522holiman wants to merge 2 commits into
Conversation
8172c36 to
5120a06
Compare
geth account new
Member
|
I'm not sure this is actually correct. https://github.com/ethereum/go-ethereum/blob/master/node/config.go#L72 I.e. The keystore path given as a flag, config or otherwise can be resolved to a lot of different locations. You PR essentially removes this resolution altogether. |
karalabe
reviewed
Nov 19, 2017
| // NewKeyStore creates a keystore for the given directory. | ||
| func NewKeyStore(keydir string, scryptN, scryptP int) *KeyStore { | ||
| // NewUninitializedKeyStore creates a keystore for the given directory, but does not load the existing keys | ||
| func NewUninitializedKeyStore(keydir string, scryptN, scryptP int) *KeyStore { |
Member
There was a problem hiding this comment.
I think this is a very ugly API hack :P
Contributor
Author
|
@karalabe you were totally right. I pushed some changes, so that it now correctly uses the configuration. The code is on the level of 'it works but it aint pretty'. If I get the time, I'll try to make another stab at a nicer fix. |
Contributor
Author
|
Closing this in favour of #15529 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The changes introduced in #15171 made an initial scan of the filesystem performed upon startup. This had an adverse effect in the case where geth was not actually intended to run in normal 'daemon'-mode, but was only meant for brief
geth account new.This PR makes the
geth account newnot configure a complete full node, but instead initalize a keystore directly. When doing so, it can avoind to load all existing files from the keystore directory.Fixes #15511.
On commit
88b1db728826efd499ea407579f41e8b683d6b53(with 55k accounts):With this PR: