sumoprojects / sumokoin

Sumokoin - Digital Cash For Highly-Confidential Transactions
https://www.sumokoin.org
Other
131 stars 69 forks source link

[wallet2] fix precision of average_output_time and harden code against invalid input types #1227

Closed sumogr closed 3 years ago

sumogr commented 3 years ago

Needs a release. No need to change the entire output selection distribution pattern for a bit of distribution selection skewing Our txs are few, our ring size is enormous and the skewing is insignificant, it wont make any difference so just cover the extreme case of average_output_time == 0 to avoid the division with zero here uint64_t output_index = x / average_output_time; Funny thing is that on wallet2 header file average_output_time is already declared as double so i guess they forgot to cast it when they introduced that bit of code

quangvu3 commented 3 years ago

We'll have a new release early next week