mirror of
https://github.com/monero-project/monero.git
synced 2025-06-07 13:52:45 -04:00
wallet: fix different-signedness int comparison warnings
This commit is contained in:
parent
44523cafff
commit
5393bef139
1 changed files with 2 additions and 2 deletions
|
@ -1034,7 +1034,7 @@ gamma_picker::gamma_picker(const std::vector<uint64_t> &rct_offsets, double shap
|
||||||
rct_offsets(rct_offsets)
|
rct_offsets(rct_offsets)
|
||||||
{
|
{
|
||||||
gamma = std::gamma_distribution<double>(shape, scale);
|
gamma = std::gamma_distribution<double>(shape, scale);
|
||||||
THROW_WALLET_EXCEPTION_IF(rct_offsets.size() < std::max(1, CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE), error::wallet_internal_error, "Bad offset calculation");
|
THROW_WALLET_EXCEPTION_IF(rct_offsets.size() < std::max<size_t>(1, CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE), error::wallet_internal_error, "Bad offset calculation");
|
||||||
const size_t blocks_in_a_year = 86400 * 365 / DIFFICULTY_TARGET_V2;
|
const size_t blocks_in_a_year = 86400 * 365 / DIFFICULTY_TARGET_V2;
|
||||||
const size_t blocks_to_consider = std::min<size_t>(rct_offsets.size(), blocks_in_a_year);
|
const size_t blocks_to_consider = std::min<size_t>(rct_offsets.size(), blocks_in_a_year);
|
||||||
const size_t outputs_to_consider = rct_offsets.back() - (blocks_to_consider < rct_offsets.size() ? rct_offsets[rct_offsets.size() - blocks_to_consider - 1] : 0);
|
const size_t outputs_to_consider = rct_offsets.back() - (blocks_to_consider < rct_offsets.size() ? rct_offsets[rct_offsets.size() - blocks_to_consider - 1] : 0);
|
||||||
|
@ -9149,7 +9149,7 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>>
|
||||||
if (has_rct)
|
if (has_rct)
|
||||||
{
|
{
|
||||||
// check we're clear enough of rct start, to avoid corner cases below
|
// check we're clear enough of rct start, to avoid corner cases below
|
||||||
THROW_WALLET_EXCEPTION_IF(rct_offsets.size() < std::max(1, CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE),
|
THROW_WALLET_EXCEPTION_IF(rct_offsets.size() < std::max<size_t>(1, CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE),
|
||||||
error::get_output_distribution, "Not enough rct outputs");
|
error::get_output_distribution, "Not enough rct outputs");
|
||||||
THROW_WALLET_EXCEPTION_IF(rct_offsets.back() <= max_rct_index,
|
THROW_WALLET_EXCEPTION_IF(rct_offsets.back() <= max_rct_index,
|
||||||
error::get_output_distribution, "Daemon reports suspicious number of rct outputs");
|
error::get_output_distribution, "Daemon reports suspicious number of rct outputs");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue