From ac192ac00a0bb3b9a6a4ae7b00931b4017e7d193 Mon Sep 17 00:00:00 2001 From: Jonathan Gimeno Date: Tue, 17 Mar 2020 20:18:22 +0100 Subject: [PATCH 1/3] remove old method closeDb from Keybase interface --- crypto/keys/keybase.go | 5 ----- crypto/keys/keyring.go | 3 --- crypto/keys/keyring_test.go | 2 -- crypto/keys/lazy_keybase.go | 2 -- crypto/keys/types.go | 3 --- 5 files changed, 15 deletions(-) diff --git a/crypto/keys/keybase.go b/crypto/keys/keybase.go index b55c7b68b542..2d7e79710f5b 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 450b0d32bb42..3353597f360a 100644 --- a/crypto/keys/keyring.go +++ b/crypto/keys/keyring.go @@ -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() diff --git a/crypto/keys/keyring_test.go b/crypto/keys/keyring_test.go index dd179a0c12a3..16325b380af8 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 2a92ecd304ce..3ee7e2c16b2b 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 89f5cb2d539b..5149d1c582a0 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. From 40df314a2444b3e12df06bf5bf5bbc76739d00f1 Mon Sep 17 00:00:00 2001 From: Jonathan Gimeno Date: Tue, 17 Mar 2020 20:21:19 +0100 Subject: [PATCH 2/3] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88549940f629..0c913de72f79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. ## [v0.38.1] - 2020-02-11 From 84398e9c2c3b876525e7ca4f35220f7a3411b003 Mon Sep 17 00:00:00 2001 From: Jonathan Gimeno Date: Wed, 18 Mar 2020 13:25:02 +0100 Subject: [PATCH 3/3] move to api breaking changes --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c913de72f79..78f0ce723ba2 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 @@ -166,7 +167,6 @@ 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. ## [v0.38.1] - 2020-02-11