mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
cmd/utils: don't unlock new keystore
This commit is contained in:
parent
927abd60f8
commit
c086718f4d
1 changed files with 3 additions and 3 deletions
|
|
@ -1733,15 +1733,15 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||||
} else {
|
} else {
|
||||||
if accs := ks.Accounts(); len(accs) > 0 {
|
if accs := ks.Accounts(); len(accs) > 0 {
|
||||||
developer = ks.Accounts()[0]
|
developer = ks.Accounts()[0]
|
||||||
|
if err := ks.Unlock(developer, passphrase); err != nil {
|
||||||
|
Fatalf("Failed to unlock developer account: %v", err)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
developer, err = ks.NewAccount(passphrase)
|
developer, err = ks.NewAccount(passphrase)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatalf("Failed to create developer account: %v", err)
|
Fatalf("Failed to create developer account: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := ks.Unlock(developer, passphrase); err != nil {
|
|
||||||
Fatalf("Failed to unlock developer account: %v", err)
|
|
||||||
}
|
|
||||||
// Make sure the address is configured as fee recipient, otherwise
|
// Make sure the address is configured as fee recipient, otherwise
|
||||||
// the miner will fail to start.
|
// the miner will fail to start.
|
||||||
cfg.Miner.PendingFeeRecipient = developer.Address
|
cfg.Miner.PendingFeeRecipient = developer.Address
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue