Fix tx construction bug in attempts check

This commit is contained in:
Lee *!* Clagett
2025-08-19 20:18:30 -04:00
parent 56a37f4ca7
commit 25e4559f76
+3 -2
View File
@@ -1780,7 +1780,8 @@ namespace lwsf { namespace internal
const auto unspent_by_amount = get_unspent_by_amount(unspent);
unsigned attempt = 0;
for (; attempt < unspent.size(); ++attempt)
const std::size_t max_attempts = unspent.size();
for (; attempt < max_attempts; ++attempt)
{
try
{
@@ -1797,7 +1798,7 @@ namespace lwsf { namespace internal
}
}
if (attempt == unspent.size())
if (attempt == max_attempts)
throw_low_funds();
}