diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp index 41ed9acb461..e706b0f3b94 100644 --- a/src/wallet/coinselection.cpp +++ b/src/wallet/coinselection.cpp @@ -308,6 +308,9 @@ std::optional KnapsackSolver(std::vector& 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", it->second, it->first.GetHex()); + return std::nullopt; } }