Address a comment

This commit is contained in:
JCW
2026-07-06 17:20:02 +01:00
parent 6647b60167
commit 4d92e6a19d

View File

@@ -1133,7 +1133,7 @@ ValidVault::finalize(
// A loan set must create exactly one loan object; the interest
// it books is the only permitted change to assets outstanding.
if (beforeLoan_.empty() && afterLoan_.size() != 1)
if (afterLoan_.size() != 1 || !beforeLoan_.empty())
{
JLOG(j.fatal()) << //
"Invariant failed: loan set must create exactly one loan";