From 42e14840fb7c805a65c955e1abf0ee2c004839ac Mon Sep 17 00:00:00 2001 From: xiphon Date: Tue, 5 May 2020 02:30:54 +0000 Subject: wallet2: fix keys file deserialization exception handling --- src/wallet/wallet2.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 476248d18..3ee708b6c 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3978,13 +3978,7 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_ // Load keys from buffer boost::optional keys_to_encrypt; - try { - r = wallet2::load_keys_buf(keys_file_buf, password, keys_to_encrypt); - } catch (const std::exception& e) { - std::size_t found = string(e.what()).find("failed to deserialize keys buffer"); - THROW_WALLET_EXCEPTION_IF(found != std::string::npos, error::wallet_internal_error, "internal error: failed to deserialize \"" + keys_file_name + '\"'); - throw e; - } + r = wallet2::load_keys_buf(keys_file_buf, password, keys_to_encrypt); // Rewrite with encrypted keys if unencrypted, ignore errors if (r && keys_to_encrypt != boost::none) -- cgit v1.2.3