diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 4 | ||||
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 3f5297dfe..36d1fa0a9 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1701,7 +1701,9 @@ bool simple_wallet::open_wallet(const string &wallet_file, const std::string& pa catch (const std::exception& e) { fail_msg_writer() << tr("failed to load wallet: ") << e.what(); - fail_msg_writer() << boost::format(tr("You may want to remove the file \"%s\" and try again")) % wallet_file; + // only suggest removing cache if the password was actually correct + if (m_wallet->verify_password(password)) + fail_msg_writer() << boost::format(tr("You may want to remove the file \"%s\" and try again")) % wallet_file; return false; } diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 922409519..8502353ed 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -28,6 +28,7 @@ // // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers +#include <random> #include <boost/archive/binary_oarchive.hpp> #include <boost/archive/binary_iarchive.hpp> @@ -3502,6 +3503,9 @@ uint64_t wallet2::import_key_images(const std::vector<std::pair<crypto::key_imag req.key_images.push_back(epee::string_tools::pod_to_hex(key_image)); } + for (size_t n = 0; n < signed_key_images.size(); ++n) + m_transfers[n].m_key_image = signed_key_images[n].first; + m_daemon_rpc_mutex.lock(); bool r = epee::net_utils::invoke_http_json_remote_command2(m_daemon_address + "/is_key_image_spent", req, daemon_resp, m_http_client, 200000); m_daemon_rpc_mutex.unlock(); |