aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.h
diff options
context:
space:
mode:
authorCrypto City <cryptocity@example.com>2023-03-21 09:02:38 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2023-03-25 19:26:43 +0000
commit132804811d141d29bef341fa5d30dd4b934beeb5 (patch)
tree5ad8c31016c2244ff939bad9ba065bbb768b11c1 /src/wallet/wallet2.h
parentMerge pull request #8785 (diff)
downloadmonero-132804811d141d29bef341fa5d30dd4b934beeb5.tar.xz
wallet2: fix infinite loop in fake out selection
The gamma picker and the caller code did not quite agree on the number of rct outputs available for use - by one block - which caused an infinite loop if the picker could never pick outputs from that block but already had picked all other outputs from previous blocks. Also change the range to select from using code from UkoeHB.
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r--src/wallet/wallet2.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index 3fcefd16f..50975c756 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -101,6 +101,7 @@ namespace tools
uint64_t pick();
gamma_picker(const std::vector<uint64_t> &rct_offsets);
gamma_picker(const std::vector<uint64_t> &rct_offsets, double shape, double scale);
+ uint64_t get_num_rct_outs() const { return num_rct_outputs; }
private:
struct gamma_engine