clboss/tests/util
Ken Sedgwick 10ffad5099
Util::Str::group_digits -- readable msat/sat amounts in the xrebalance logs
Large amounts in the XRebalancer / XMoveFunds log lines were
unbroken digit runs (delivered 18851040 msat); grep-heavy log
sessions kept miscounting them.  Add Util::Str::group_digits,
which renders an integer with an underscore every three digit
places (18_851_040), matching the digit grouping
clboss-xrebalance-view and the other contrib tools already
print.

Applied to the amounts that get large:
- XRebalancer cycle line (derived N, request)
- XRebalancer transfer-done line (delivered, fee)
- XMoveFunds planning line (amount, maxfee)
- XMoveFunds 204 summary and fee-picture diagnostics
  (alloc_fee, required_out)
- XMoveFunds per-part budget refusals (would deliver)
- format_route_fees per-hop table (in/out/fee)

Counts, ppm values, and cltv deltas stay plain.  Signed
overload handles the int64 call sites (INT64_MIN-safe).

New tests/util/test_str covers both overloads and the
boundary cases.
2026-08-04 11:02:00 -07:00
..
test_date.cpp Util/date.cpp: Function to describe dates. 2021-04-26 16:17:10 +08:00
test_duration.cpp Util/duration.cpp: Utility for human-readable durations. 2021-04-26 16:17:10 +08:00
test_either.cpp feat: add clang C++20 build job to CI 2026-03-04 11:24:31 -08:00
test_format.cpp tests/util/test_format.cpp: Add test for Util::format. 2021-08-12 08:08:14 +08:00
test_str.cpp Util::Str::group_digits -- readable msat/sat amounts in the xrebalance logs 2026-08-04 11:02:00 -07:00