An adversarial posting set of two MaxInt64 legs plus one of 2 wraps to zero in int64 arithmetic, so the balance check passed and the ledger minted 18 quintillion millisatoshis from nothing. The sum is now accumulated in big.Int, per-account balance arithmetic is checked for wraparound, and the audit totals parse through big.Int so a corrupt ledger reports a clear error rather than failing to scan. Adds room package tests (0% -> covered) and ledger edge cases. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
15 KiB
15 KiB