Skip to content

Commit

Permalink
coinselection: fail if each non-policy asset doesn't have a solution
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdorfman authored and delta1 committed Oct 23, 2023
1 parent d3ffd2a commit 8abe0fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wallet/coinselection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ std::optional<SelectionResult> KnapsackSolver(std::vector<OutputGroup>& groups,
non_policy_effective_value += ic.effective_value;
}
result.AddInput(inner_result.value());
} else {
LogPrint(BCLog::SELECTCOINS, "Not enough funds to create target %d for asset %s<newline>", it->second, it->first.GetHex());
return std::nullopt;
}
}

Expand Down

0 comments on commit 8abe0fa

Please sign in to comment.