diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index e66ff8c97cc29..c02ee1ec8533a 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -633,7 +633,7 @@ util::Result AutomaticCoinSelection(const CWallet& wallet, Coin // Coin Selection attempts to select inputs from a pool of eligible UTXOs to fund the // transaction at a target feerate. If an attempt fails, more attempts may be made using a more // permissive CoinEligibilityFilter. - util::Result res = [&] { + return [&] { // Place coins eligibility filters on a scope increasing order. std::vector ordered_filters{ // If possible, fund the transaction with confirmed UTXOs only. Prefer at least six @@ -684,8 +684,6 @@ util::Result AutomaticCoinSelection(const CWallet& wallet, Coin // Coin Selection failed. return res_detailed_errors.empty() ? util::Result(util::Error()) : res_detailed_errors.front(); }(); - - return res; } static bool IsCurrentForAntiFeeSniping(interfaces::Chain& chain, const uint256& block_hash)