diff options
author | Martin Holst Swende <martin@swende.se> | 2019-02-05 18:23:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-05 18:23:57 +0800 |
commit | 43e8efe8955b8bb1fab7bfced33a6302fb69e48e (patch) | |
tree | 3db96494c913b31be950f5580bf49a82141b9255 /cmd/geth | |
parent | 520024dfd689d264807b7fe1fc28deba51d6ab20 (diff) | |
download | go-tangerine-43e8efe8955b8bb1fab7bfced33a6302fb69e48e.tar go-tangerine-43e8efe8955b8bb1fab7bfced33a6302fb69e48e.tar.gz go-tangerine-43e8efe8955b8bb1fab7bfced33a6302fb69e48e.tar.bz2 go-tangerine-43e8efe8955b8bb1fab7bfced33a6302fb69e48e.tar.lz go-tangerine-43e8efe8955b8bb1fab7bfced33a6302fb69e48e.tar.xz go-tangerine-43e8efe8955b8bb1fab7bfced33a6302fb69e48e.tar.zst go-tangerine-43e8efe8955b8bb1fab7bfced33a6302fb69e48e.zip |
accounts, eth, clique, signer: support for external signer API (#18079)
* accounts, eth, clique: implement external backend + move sighash calc to backend
* signer: implement account_Version on external API
* accounts/external: enable ipc, add copyright
* accounts, internal, signer: formatting
* node: go fmt
* flags: disallow --dev in combo with --externalsigner
* accounts: remove clique-specific signing method, replace with more generic
* accounts, consensus: formatting + fix error in tests
* signer/core: remove (test-) import cycle
* clique: remove unused import
* accounts: remove CliqueHash and avoid dependency on package crypto
* consensus/clique: unduplicate header encoding
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/main.go | 16 | ||||
-rw-r--r-- | cmd/geth/usage.go | 1 |
2 files changed, 10 insertions, 7 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 0a6616312..dca02c82e 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -62,6 +62,7 @@ var ( utils.BootnodesV5Flag, utils.DataDirFlag, utils.KeyStoreDirFlag, + utils.ExternalSignerFlag, utils.NoUSBFlag, utils.DashboardEnabledFlag, utils.DashboardAddrFlag, @@ -293,13 +294,14 @@ func startNode(ctx *cli.Context, stack *node.Node) { utils.StartNode(stack) // Unlock any account specifically requested - ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore) - - passwords := utils.MakePasswordList(ctx) - unlocks := strings.Split(ctx.GlobalString(utils.UnlockedAccountFlag.Name), ",") - for i, account := range unlocks { - if trimmed := strings.TrimSpace(account); trimmed != "" { - unlockAccount(ctx, ks, trimmed, i, passwords) + if keystores := stack.AccountManager().Backends(keystore.KeyStoreType); len(keystores) > 0 { + ks := keystores[0].(*keystore.KeyStore) + passwords := utils.MakePasswordList(ctx) + unlocks := strings.Split(ctx.GlobalString(utils.UnlockedAccountFlag.Name), ",") + for i, account := range unlocks { + if trimmed := strings.TrimSpace(account); trimmed != "" { + unlockAccount(ctx, ks, trimmed, i, passwords) + } } } // Register wallet event handlers to open and auto-derive wallets diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 1579134f9..0b5c6fd90 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -145,6 +145,7 @@ var AppHelpFlagGroups = []flagGroup{ Flags: []cli.Flag{ utils.UnlockedAccountFlag, utils.PasswordFileFlag, + utils.ExternalSignerFlag, }, }, { |