mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
flags: disallow --dev in combo with --externalsigner
This commit is contained in:
parent
d716bd57d0
commit
762482ef2c
2 changed files with 5 additions and 1 deletions
|
|
@ -1174,7 +1174,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
||||||
// Avoid conflicting network flags
|
// Avoid conflicting network flags
|
||||||
checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag)
|
checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag)
|
||||||
checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
|
checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
|
||||||
|
// Can't use both ephemeral unlocked and external signer
|
||||||
|
checkExclusive(ctx, DeveloperFlag, ExternalSignerFlag)
|
||||||
var ks *keystore.KeyStore
|
var ks *keystore.KeyStore
|
||||||
if keystores := stack.AccountManager().Backends(keystore.KeyStoreType); len(keystores) > 0 {
|
if keystores := stack.AccountManager().Backends(keystore.KeyStoreType); len(keystores) > 0 {
|
||||||
ks = keystores[0].(*keystore.KeyStore)
|
ks = keystores[0].(*keystore.KeyStore)
|
||||||
|
|
|
||||||
|
|
@ -436,8 +436,11 @@ func makeAccountManager(conf *Config) (*accounts.Manager, string, error) {
|
||||||
// Assemble the account manager and supported backends
|
// Assemble the account manager and supported backends
|
||||||
backends := []accounts.Backend{}
|
backends := []accounts.Backend{}
|
||||||
if len(conf.ExternalSigner) > 0 {
|
if len(conf.ExternalSigner) > 0 {
|
||||||
|
log.Info("Using external signer", "url", conf.ExternalSigner)
|
||||||
if extapi, err := external.NewExternalBackend(conf.ExternalSigner); err == nil {
|
if extapi, err := external.NewExternalBackend(conf.ExternalSigner); err == nil {
|
||||||
backends = append(backends, extapi)
|
backends = append(backends, extapi)
|
||||||
|
} else {
|
||||||
|
log.Info("Error configuring external signer", "error", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(backends) == 0 {
|
if len(backends) == 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue