From cebae0c510b49f8eb77f6ace34b91601a62830c4 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 25 Dec 2016 20:35:48 +0000 Subject: wallet2: check the node returned the real output when requested --- src/wallet/wallet2.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 221dd8e0b..6d8d7c003 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3521,6 +3521,23 @@ void wallet2::get_outs(std::vector> &outs, const std::list(td.m_tx.vout[td.m_internal_output_index].target).key) + if (daemon_resp.outs[i].mask == mask) + real_out_found = true; + } + THROW_WALLET_EXCEPTION_IF(!real_out_found, error::wallet_internal_error, + "Daemon response did not include the requested real output"); + // pick real out first (it will be sorted when done) outs.back().push_back(std::make_tuple(td.m_global_output_index, boost::get(td.m_tx.vout[td.m_internal_output_index].target).key, mask)); -- cgit v1.2.3