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-30 14:44:36 +0000
commit85a45587f231c6059dbf351fa4c653a6806d27ea (patch)
tree5150ebdc0633fc5021e26d79ba4f0b04e71a680c /src/wallet/wallet2.h
parentMerge pull request #8775 (diff)
downloadmonero-85a45587f231c6059dbf351fa4c653a6806d27ea.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 '')
-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 18740f5d9..40fa0bbad 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