From cdff63628eedb58cc7278e8cd7cee7c92624b52f Mon Sep 17 00:00:00 2001 From: j-berman Date: Fri, 22 Mar 2024 14:05:17 -0700 Subject: [PATCH] wallet2: ensure transfers and sweeps use same fee calc logic rnd2 Looks like the logic from #8882 was accidentally removed in #8861 (regressing to the behavior noted in the #8882 description). This commit brings that logic back. --- src/wallet/wallet2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 5f8bae7a7..fa03db792 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -11218,8 +11218,8 @@ std::vector wallet2::create_transactions_2(std::vector test_ptx.fee; ++fee_tries) { + size_t fee_tries = 0; + do { tx_dsts = tx.get_adjusted_dsts(needed_fee); if (use_rct) @@ -11232,7 +11232,7 @@ std::vector wallet2::create_transactions_2(std::vector test_ptx.fee && ++fee_tries < 10); THROW_WALLET_EXCEPTION_IF(fee_tries == 10, error::wallet_internal_error, "Too many attempts to raise pending tx fee to level of needed fee");