From a73c877061d5b4d92a965b440291a036f6f0af8f Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Mon, 1 Mar 2021 19:36:46 +0000 Subject: [PATCH] Rename InfoImporter -> LegacyInfoImporter Avoid namespace clash with the InfoImporter interface that already exists in the v0.41 release series. --- client/keys/migrate.go | 2 +- crypto/keyring/keyring.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/keys/migrate.go b/client/keys/migrate.go index 4848ec281162..4816381e8c6f 100644 --- a/client/keys/migrate.go +++ b/client/keys/migrate.go @@ -111,7 +111,7 @@ func runMigrateCmd(cmd *cobra.Command, args []string) error { // TypeLocal needs an additional step to ask password. // The other keyring types are handled by ImportInfo. if keyType != keyring.TypeLocal { - infoImporter, ok := migrator.(keyring.InfoImporter) + infoImporter, ok := migrator.(keyring.LegacyInfoImporter) if !ok { return fmt.Errorf("the Keyring implementation does not support import operations of Info types") } diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 45b43ac2319a..9734af37b1ae 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -116,8 +116,8 @@ type Importer interface { ImportPubKey(uid string, armor string) error } -// InfoImporter is implemented by key stores that support import of Info types. -type InfoImporter interface { +// LegacyInfoImporter is implemented by key stores that support import of Info types. +type LegacyInfoImporter interface { // ImportInfo import a keyring.Info into the current keyring. // It is used to migrate multisig, ledger, and public key Info structure. ImportInfo(oldInfo Info) error