diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-20 16:07:53 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-20 16:16:38 -0700 |
commit | d636f3943d39ec893dab2d2546f77f3f2607769d (patch) | |
tree | 9aed5dfab04afcea8ea06ed6c5965ba3092ef28e /src/wallet/walletdb.cpp | |
parent | c38f540298f0e188df5ed68fd56c623b9ac8331b (diff) | |
parent | 4265bf351a5c7b89ec33deff9f3800f28ff6f3e3 (diff) |
Merge #10536: Remove unreachable or otherwise redundant code
4265bf351 Remove unreachable or otherwise redundant code (practicalswift)
Tree-SHA512: bc9666ab5d20c936d78c50c0361405aca9edd116602aa9bcd71a79a904b647ac9eca0651d1a9d530189a6ac1c4e235bfc69ec1a68f7e36cc14d6848ac2206b7b
Diffstat (limited to 'src/wallet/walletdb.cpp')
-rw-r--r-- | src/wallet/walletdb.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index eca6706c06..8321719b56 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -76,8 +76,6 @@ bool CWalletDB::WriteCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret, const CKeyMetadata &keyMeta) { - const bool fEraseUnencryptedKey = true; - if (!WriteIC(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta)) { return false; } @@ -85,12 +83,8 @@ bool CWalletDB::WriteCryptedKey(const CPubKey& vchPubKey, if (!WriteIC(std::make_pair(std::string("ckey"), vchPubKey), vchCryptedSecret, false)) { return false; } - if (fEraseUnencryptedKey) - { - EraseIC(std::make_pair(std::string("key"), vchPubKey)); - EraseIC(std::make_pair(std::string("wkey"), vchPubKey)); - } - + EraseIC(std::make_pair(std::string("key"), vchPubKey)); + EraseIC(std::make_pair(std::string("wkey"), vchPubKey)); return true; } |