Skip to content

Commit

Permalink
Rename InfoImporter -> LegacyInfoImporter (#8739)
Browse files Browse the repository at this point in the history
Avoid namespace clash with the InfoImporter interface
that already exists in the v0.41 release series.
  • Loading branch information
Alessio Treglia committed Mar 1, 2021
1 parent 1c6e267 commit 010eeef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/keys/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
4 changes: 2 additions & 2 deletions crypto/keyring/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 010eeef

Please sign in to comment.