diff options
author | Crypto City <cryptocity@example.com> | 2023-03-21 09:02:38 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2023-03-30 14:44:36 +0000 |
commit | 85a45587f231c6059dbf351fa4c653a6806d27ea (patch) | |
tree | 5150ebdc0633fc5021e26d79ba4f0b04e71a680c /src/wallet/wallet2.h | |
parent | Merge pull request #8775 (diff) | |
download | monero-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.h | 1 |
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 |