From def43a4d888b4a21c082404d1b25707c481d7625 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Mon, 28 Feb 2022 12:07:57 +0000 Subject: [PATCH] refactor: Rename i to curr_try in SelectCoinsBnB Clarifies purpose and removes name collisions with other indicies. --- src/wallet/coinselection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp index b3d7c685dd1..c63804a7a94 100644 --- a/src/wallet/coinselection.cpp +++ b/src/wallet/coinselection.cpp @@ -87,7 +87,7 @@ std::optional SelectCoinsBnB(std::vector& utxo_poo CAmount best_waste = MAX_MONEY; // Depth First search loop for choosing the UTXOs - for (size_t i = 0, utxo_pool_index = 0; i < TOTAL_TRIES; ++i, ++utxo_pool_index) { + for (size_t curr_try = 0, utxo_pool_index = 0; curr_try < TOTAL_TRIES; ++curr_try, ++utxo_pool_index) { // Conditions for starting a backtrack bool backtrack = false; if (curr_value + curr_available_value < selection_target || // Cannot possibly reach target with the amount remaining in the curr_available_value.