clboss/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
..
BacktraceException.hpp disable backtrace capture under valgrind to avoid false positives 2025-12-10 11:37:21 -08:00
Bech32.cpp Util/Bech32.cpp: lowercase the HRP. 2020-09-24 14:13:39 +08:00
Bech32.hpp feat: add clang C++20 build job to CI 2026-03-04 11:24:31 -08:00
Compiler.hpp build: Use __GNUC__ instead of __GNUC_PREREQ, fixes Alpine build 2023-09-22 12:52:57 -07:00
date.cpp Util/date.cpp: Function to describe dates. 2021-04-26 16:17:10 +08:00
date.hpp Util/date.cpp: Function to describe dates. 2021-04-26 16:17:10 +08:00
duration.cpp Util/duration.cpp: Utility for human-readable durations. 2021-04-26 16:17:10 +08:00
duration.hpp Util/duration.cpp: Utility for human-readable durations. 2021-04-26 16:17:10 +08:00
Either.hpp add Either::operator<< to support debugging 2024-09-25 13:23:04 -05:00
format.cpp Util/format.cpp: Utility to format strings. 2021-08-12 07:52:34 +08:00
format.hpp Util/format.cpp: Utility to format strings. 2021-08-12 07:52:34 +08:00
make_unique.hpp Util/make_unique.hpp: Add shim for std::make_unique. 2020-08-24 04:25:58 +00:00
Rw.cpp Util/Rw.cpp: Implement read and write helpers. 2020-08-30 21:01:15 +08:00
Rw.hpp Util/Rw.cpp: Implement read and write helpers. 2020-08-30 21:01:15 +08:00
Str.cpp Util::Str::group_digits -- readable msat/sat amounts in the xrebalance logs 2026-08-04 11:02:00 -07:00
Str.hpp Util::Str::group_digits -- readable msat/sat amounts in the xrebalance logs 2026-08-04 11:02:00 -07:00
stream_elements.hpp Improve the ConstructedListpeers handling diagnostics 2024-07-16 16:01:56 -07:00
stringify.hpp Util/stringify.hpp: Convenience function to stringify most things. 2020-09-15 14:23:43 +08:00
vector_emplace_back.hpp Util/vector_emplace_back.hpp: Utility function to wrap around missing operations in std::vector<bool>. 2020-11-06 09:22:46 +00:00