Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CloseDB method from Keybase interface #5820

Merged
merged 4 commits into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ Buffers for state serialization instead of Amino.
* (server) [\#5709](https://github.com/cosmos/cosmos-sdk/pull/5709) There are two new flags for pruning, `--pruning-keep-every`
and `--pruning-snapshot-every` as an alternative to `--pruning`. They allow to fine tune the strategy for pruning the state.
* (crypto/keys) [\#5739](https://github.com/cosmos/cosmos-sdk/pull/5739) Print an error message if the password input failed.
* (keys) [\#5820](https://github.com/cosmos/cosmos-sdk/pull/5820/) Removed method CloseDB from Keybase interface.
jgimeno marked this conversation as resolved.
Show resolved Hide resolved

## [v0.38.1] - 2020-02-11

Expand Down
5 changes: 0 additions & 5 deletions crypto/keys/keybase.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,6 @@ func (kb dbKeybase) Update(name, oldpass string, getNewpass func() (string, erro
}
}

// CloseDB releases the lock and closes the storage backend.
func (kb dbKeybase) CloseDB() {
kb.db.Close()
}

// SupportedAlgos returns a list of supported signing algorithms.
func (kb dbKeybase) SupportedAlgos() []SigningAlgo {
return kb.base.SupportedAlgos()
Expand Down
3 changes: 0 additions & 3 deletions crypto/keys/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,6 @@ func (kb keyringKeybase) SupportedAlgosLedger() []SigningAlgo {
return kb.base.SupportedAlgosLedger()
}

// CloseDB releases the lock and closes the storage backend.
func (kb keyringKeybase) CloseDB() {}

func (kb keyringKeybase) writeLocalKey(name string, priv tmcrypto.PrivKey, _ string, algo SigningAlgo) Info {
// encrypt private key using keyring
pub := priv.PubKey()
Expand Down
2 changes: 0 additions & 2 deletions crypto/keys/keyring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ func TestLazyKeyManagementKeyRing(t *testing.T) {

// addr cache gets nuked - and test skip flag
require.NoError(t, kb.Delete(n2, "", true))

require.NotPanics(t, kb.CloseDB)
}

// TestSignVerify does some detailed checks on how we sign and validate
Expand Down
2 changes: 0 additions & 2 deletions crypto/keys/lazy_keybase.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,3 @@ func (lkb lazyKeybase) SupportedAlgos() []SigningAlgo {
func (lkb lazyKeybase) SupportedAlgosLedger() []SigningAlgo {
return newBaseKeybase(lkb.options...).SupportedAlgosLedger()
}

func (lkb lazyKeybase) CloseDB() {}
3 changes: 0 additions & 3 deletions crypto/keys/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ type Keybase interface {

// SupportedAlgosLedger returns a list of signing algorithms supported by the keybase's ledger integration
SupportedAlgosLedger() []SigningAlgo

// CloseDB closes the database.
CloseDB()
}

// KeyType reflects a human-readable type for key listing.
Expand Down