From 427ba7702fb8c4047662f0c8edcdd7e529b9ff28 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 a9ad67f04..5c749d33e 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -10422,8 +10422,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) @@ -10436,7 +10436,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");