diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-28 18:26:06 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-03-16 10:32:51 +0000 |
commit | b09e5181cc7c24fc6cf13b4a43044833bd2763fa (patch) | |
tree | b84eb0ddb4b59cb21a1cd478db58c173444a2f1a /src/wallet/wallet2.cpp | |
parent | new blockchain_usage tool, reports on output usage (diff) | |
download | monero-b09e5181cc7c24fc6cf13b4a43044833bd2763fa.tar.xz |
wallet: add a set_ring command
This is so one can set rings for spent key images in case the
attackers don't merge the ring matching patch set.
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 732dc0789..b2cbd416b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5496,6 +5496,17 @@ bool wallet2::get_ring(const crypto::key_image &key_image, std::vector<uint64_t> return get_ring(key, key_image, outs); } +bool wallet2::set_ring(const crypto::key_image &key_image, const std::vector<uint64_t> &outs, bool relative) +{ + if (!m_ringdb) + return true; + + crypto::chacha_key key; + generate_chacha_key_from_secret_keys(key); + + return m_ringdb->set_ring(key, key_image, outs, relative); +} + bool wallet2::find_and_save_rings(bool force) { if (!force && m_ring_history_saved) |