diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-06-12 15:01:46 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-06-12 15:01:46 +0200 |
commit | 4265bf351a5c7b89ec33deff9f3800f28ff6f3e3 (patch) | |
tree | 9267a414b11a86780a4163bee5b9461142b80f3b /src/wallet/walletdb.cpp | |
parent | 177433ad22d6b386fec10a92a14cd8472ea02f41 (diff) | |
download | bitcoin-4265bf351a5c7b89ec33deff9f3800f28ff6f3e3.tar.xz |
Remove unreachable or otherwise redundant code
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 7731fa5631..d839beca88 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; } |