From 8703b8a4cb978343e4e56eec95e8d67939611f50 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 f34b10988..6ae31b8bb 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -11119,8 +11119,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) @@ -11133,7 +11133,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");