Skip to content

Commit

Permalink
refactor: wallet, avoid shadowing, remove unneeded res variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Feb 13, 2023
1 parent b92d609 commit 3fb01a9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/wallet/spend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ util::Result<SelectionResult> 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<SelectionResult> res = [&] {
return [&] {
// Place coins eligibility filters on a scope increasing order.
std::vector<SelectionFilter> ordered_filters{
// If possible, fund the transaction with confirmed UTXOs only. Prefer at least six
Expand Down Expand Up @@ -684,8 +684,6 @@ util::Result<SelectionResult> AutomaticCoinSelection(const CWallet& wallet, Coin
// Coin Selection failed.
return res_detailed_errors.empty() ? util::Result<SelectionResult>(util::Error()) : res_detailed_errors.front();
}();

return res;
}

static bool IsCurrentForAntiFeeSniping(interfaces::Chain& chain, const uint256& block_hash)
Expand Down

0 comments on commit 3fb01a9

Please sign in to comment.