From 85a45587f231c6059dbf351fa4c653a6806d27ea Mon Sep 17 00:00:00 2001 From: Crypto City Date: Tue, 21 Mar 2023 09:02:38 +0000 Subject: 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. --- src/wallet/wallet2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet/wallet2.h') 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 &rct_offsets); gamma_picker(const std::vector &rct_offsets, double shape, double scale); + uint64_t get_num_rct_outs() const { return num_rct_outputs; } private: struct gamma_engine -- cgit v1.2.3