From 3eadab6aa1a7b6d7bb40b748d174b6438e161638 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Wed, 6 Nov 2024 15:30:15 +0100 Subject: [PATCH] cmd/geth: remove unused code --- cmd/geth/accountcmd.go | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go index c6d2a2f678..3ce6dbaadb 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/geth/accountcmd.go @@ -220,33 +220,6 @@ func accountList(ctx *cli.Context) error { return nil } -func ambiguousAddrRecovery(ks *keystore.KeyStore, err *keystore.AmbiguousAddrError, auth string) accounts.Account { - fmt.Printf("Multiple key files exist for address %x:\n", err.Addr) - for _, a := range err.Matches { - fmt.Println(" ", a.URL) - } - fmt.Println("Testing your password against all of them...") - var match *accounts.Account - for i, a := range err.Matches { - if e := ks.Unlock(a, auth); e == nil { - match = &err.Matches[i] - break - } - } - if match == nil { - utils.Fatalf("None of the listed files could be unlocked.") - return accounts.Account{} - } - fmt.Printf("Your password unlocked %s\n", match.URL) - fmt.Println("In order to avoid this warning, you need to remove the following duplicate key files:") - for _, a := range err.Matches { - if a != *match { - fmt.Println(" ", a.URL) - } - } - return *match -} - // accountCreate creates a new account into the keystore defined by the CLI flags. func accountCreate(ctx *cli.Context) error { cfg := loadBaseConfig(ctx)