diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2958e11b..7945d66105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ and provided directly the IAVL store. to now accept a `codec.JSONMarshaler` for modular serialization of genesis state. * (crypto/keys) [\#5735](https://github.com/cosmos/cosmos-sdk/pull/5735) Keyring's Update() function is now no-op. * (types/rest) [\#5779](https://github.com/cosmos/cosmos-sdk/pull/5779) Drop unused Parse{Int64OrReturnBadRequest,QueryParamBool}() functions. +* (keys) [\#5820](https://github.com/cosmos/cosmos-sdk/pull/5820/) Removed method CloseDB from Keybase interface. ### Features diff --git a/crypto/keys/keybase.go b/crypto/keys/keybase.go index b55c7b68b5..2d7e79710f 100644 --- a/crypto/keys/keybase.go +++ b/crypto/keys/keybase.go @@ -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() diff --git a/crypto/keys/keyring.go b/crypto/keys/keyring.go index 0a76c96062..c67413987d 100644 --- a/crypto/keys/keyring.go +++ b/crypto/keys/keyring.go @@ -430,9 +430,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() diff --git a/crypto/keys/keyring_test.go b/crypto/keys/keyring_test.go index f521409657..afa726321d 100644 --- a/crypto/keys/keyring_test.go +++ b/crypto/keys/keyring_test.go @@ -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 diff --git a/crypto/keys/lazy_keybase.go b/crypto/keys/lazy_keybase.go index 2a92ecd304..3ee7e2c16b 100644 --- a/crypto/keys/lazy_keybase.go +++ b/crypto/keys/lazy_keybase.go @@ -219,5 +219,3 @@ func (lkb lazyKeybase) SupportedAlgos() []SigningAlgo { func (lkb lazyKeybase) SupportedAlgosLedger() []SigningAlgo { return newBaseKeybase(lkb.options...).SupportedAlgosLedger() } - -func (lkb lazyKeybase) CloseDB() {} diff --git a/crypto/keys/types.go b/crypto/keys/types.go index 89f5cb2d53..5149d1c582 100644 --- a/crypto/keys/types.go +++ b/crypto/keys/types.go @@ -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.