From 8e1a7d9389647f018f5dcb4cc588346bece96a13 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Wed, 6 Nov 2024 18:44:04 +0100 Subject: [PATCH] cmd/geth: remove unused + docs --- accounts/keystore/account_cache.go | 3 +-- cmd/geth/main.go | 3 +-- cmd/utils/prompt.go | 11 ----------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/accounts/keystore/account_cache.go b/accounts/keystore/account_cache.go index f7cf688e62..d3a98850c7 100644 --- a/accounts/keystore/account_cache.go +++ b/accounts/keystore/account_cache.go @@ -44,8 +44,7 @@ func byURL(a, b accounts.Account) int { return a.URL.Cmp(b.URL) } -// AmbiguousAddrError is returned when attempting to unlock -// an address for which more than one file exists. +// AmbiguousAddrError is returned when an address matches multiple files. type AmbiguousAddrError struct { Addr common.Address Matches []accounts.Account diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 185647b653..1527e180fb 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -351,8 +351,7 @@ func geth(ctx *cli.Context) error { } // startNode boots up the system node and all registered protocols, after which -// it unlocks any requested accounts, and starts the RPC/IPC interfaces and the -// miner. +// it starts the RPC/IPC interfaces and the miner. func startNode(ctx *cli.Context, stack *node.Node, isConsole bool) { // Start up the node itself utils.StartNode(ctx, stack, isConsole) diff --git a/cmd/utils/prompt.go b/cmd/utils/prompt.go index fa78311f89..9419b77010 100644 --- a/cmd/utils/prompt.go +++ b/cmd/utils/prompt.go @@ -45,14 +45,3 @@ func GetPassPhrase(text string, confirmation bool) string { } return password } - -// GetPassPhraseWithList retrieves the first password from the given list, or -// requests one interactively from the user, using the given prompt. -func GetPassPhraseWithList(text string, passwords []string) string { - // If a list of passwords was supplied, retrieve from them - if len(passwords) > 0 { - return passwords[0] - } - // Otherwise prompt the user for the password - return GetPassPhrase(text, true) -}