diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-11-06 21:33:22 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-11-06 21:33:22 +0200 |
commit | a369a13928f4937954cc094d037279355b504635 (patch) | |
tree | bdea54f56acaf387fce5c131a5c2ac089bd84847 /src/wallet | |
parent | Merge pull request #4742 (diff) | |
parent | wallet2: save ring in the ringdb once a tx is created (diff) | |
download | monero-a369a13928f4937954cc094d037279355b504635.tar.xz |
Merge pull request #4743
9335d5a2 wallet2: save ring in the ringdb once a tx is created (moneromooo-monero)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 82813d442..58ed5dcad 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -7310,6 +7310,20 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>> outs.push_back(v); } } + + // save those outs in the ringdb for reuse + for (size_t i = 0; i < selected_transfers.size(); ++i) + { + const size_t idx = selected_transfers[i]; + THROW_WALLET_EXCEPTION_IF(idx >= m_transfers.size(), error::wallet_internal_error, "selected_transfers entry out of range"); + const transfer_details &td = m_transfers[idx]; + std::vector<uint64_t> ring; + ring.reserve(outs[i].size()); + for (const auto &e: outs[i]) + ring.push_back(std::get<0>(e)); + if (!set_ring(td.m_key_image, ring, false)) + MERROR("Failed to set ring for " << td.m_key_image); + } } template<typename T> |