diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-04-06 20:34:28 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-04-12 11:07:07 +0100 |
commit | 24acb66eacf8ab3492d1ebc4fa27ce5ab00654f1 (patch) | |
tree | dc13b39a49e49ddbf4432ea4a44ae04a6bc5058f /src/wallet/wallet2.cpp | |
parent | Merge pull request #3511 (diff) | |
download | monero-24acb66eacf8ab3492d1ebc4fa27ce5ab00654f1.tar.xz |
wallet2: fix misc issues when the ringdb can't be initialized
Diffstat (limited to '')
-rw-r--r-- | src/wallet/wallet2.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index b06444132..85875b04a 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5526,7 +5526,7 @@ bool wallet2::set_ring_database(const std::string &filename) bool wallet2::add_rings(const crypto::chacha_key &key, const cryptonote::transaction_prefix &tx) { if (!m_ringdb) - return true; + return false; try { return m_ringdb->add_rings(key, tx); } catch (const std::exception &e) { return false; } } @@ -5542,7 +5542,7 @@ bool wallet2::add_rings(const cryptonote::transaction_prefix &tx) bool wallet2::remove_rings(const cryptonote::transaction_prefix &tx) { if (!m_ringdb) - return true; + return false; crypto::chacha_key key; generate_chacha_key_from_secret_keys(key); try { return m_ringdb->remove_rings(key, tx); } @@ -5552,7 +5552,7 @@ bool wallet2::remove_rings(const cryptonote::transaction_prefix &tx) bool wallet2::get_ring(const crypto::chacha_key &key, const crypto::key_image &key_image, std::vector<uint64_t> &outs) { if (!m_ringdb) - return true; + return false; try { return m_ringdb->get_ring(key, key_image, outs); } catch (const std::exception &e) { return false; } } @@ -5592,7 +5592,7 @@ bool wallet2::get_ring(const crypto::key_image &key_image, std::vector<uint64_t> bool wallet2::set_ring(const crypto::key_image &key_image, const std::vector<uint64_t> &outs, bool relative) { if (!m_ringdb) - return true; + return false; crypto::chacha_key key; generate_chacha_key_from_secret_keys(key); @@ -5606,7 +5606,7 @@ bool wallet2::find_and_save_rings(bool force) if (!force && m_ring_history_saved) return true; if (!m_ringdb) - return true; + return false; COMMAND_RPC_GET_TRANSACTIONS::request req = AUTO_VAL_INIT(req); COMMAND_RPC_GET_TRANSACTIONS::response res = AUTO_VAL_INIT(res); @@ -5665,7 +5665,7 @@ bool wallet2::find_and_save_rings(bool force) bool wallet2::blackball_output(const crypto::public_key &output) { if (!m_ringdb) - return true; + return false; try { return m_ringdb->blackball(output); } catch (const std::exception &e) { return false; } } @@ -5673,7 +5673,7 @@ bool wallet2::blackball_output(const crypto::public_key &output) bool wallet2::set_blackballed_outputs(const std::vector<crypto::public_key> &outputs, bool add) { if (!m_ringdb) - return true; + return false; try { bool ret = true; @@ -5689,7 +5689,7 @@ bool wallet2::set_blackballed_outputs(const std::vector<crypto::public_key> &out bool wallet2::unblackball_output(const crypto::public_key &output) { if (!m_ringdb) - return true; + return false; try { return m_ringdb->unblackball(output); } catch (const std::exception &e) { return false; } } @@ -5697,7 +5697,7 @@ bool wallet2::unblackball_output(const crypto::public_key &output) bool wallet2::is_output_blackballed(const crypto::public_key &output) const { if (!m_ringdb) - return true; + return false; try { return m_ringdb->blackballed(output); } catch (const std::exception &e) { return false; } } |