From 44439c32088dc684d686a392acf807f12ca0e0e9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 29 Aug 2018 16:57:12 +0000 Subject: record blackballs as amount/offset, and add export ability --- src/wallet/wallet2.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/wallet/wallet2.cpp') diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index ffd7131cd..9866aa215 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6221,7 +6221,7 @@ bool wallet2::find_and_save_rings(bool force) return true; } -bool wallet2::blackball_output(const crypto::public_key &output) +bool wallet2::blackball_output(const std::pair &output) { if (!m_ringdb) return false; @@ -6229,7 +6229,7 @@ bool wallet2::blackball_output(const crypto::public_key &output) catch (const std::exception &e) { return false; } } -bool wallet2::set_blackballed_outputs(const std::vector &outputs, bool add) +bool wallet2::set_blackballed_outputs(const std::vector> &outputs, bool add) { if (!m_ringdb) return false; @@ -6244,7 +6244,7 @@ bool wallet2::set_blackballed_outputs(const std::vector &out catch (const std::exception &e) { return false; } } -bool wallet2::unblackball_output(const crypto::public_key &output) +bool wallet2::unblackball_output(const std::pair &output) { if (!m_ringdb) return false; @@ -6252,7 +6252,7 @@ bool wallet2::unblackball_output(const crypto::public_key &output) catch (const std::exception &e) { return false; } } -bool wallet2::is_output_blackballed(const crypto::public_key &output) const +bool wallet2::is_output_blackballed(const std::pair &output) const { if (!m_ringdb) return false; @@ -6297,8 +6297,8 @@ bool wallet2::tx_add_fake_output(std::vector> if (seen_indices.count(i)) continue; + if (is_output_blackballed(std::make_pair(amount, i))) // don't add blackballed outputs + continue; seen_indices.emplace(i); LOG_PRINT_L2("picking " << i << " as " << type); -- cgit v1.2.3