clboss/tests
Ken Sedgwick cbdbae2be1
Add rebalancer mode selector (classic/off) as a dynamic option
Introduces a single source of truth for which rebalancing track is
active.  Boss::Mod::RebalanceModeManager owns the mode in memory (no
sqlite, so a restart reverts to the configured default, giving a
known-good baseline on every boot) and registers clboss-rebalance-mode
as a dynamic option: the config file sets the startup default and
`setconfig clboss-rebalance-mode <mode>` switches it at runtime without
a restart.  It answers RequestRebalanceMode queries and reports the mode
under clboss-status.

Modes are "classic" (run the rebalancer) and "off" (a real quiesce,
also the supported way to disable rebalancing entirely).  This is the
seam that later lets a second rebalancing track coexist and be toggled
without a restart.

The classic-track rebalancers self-gate on the mode at their existing
decision points, modeled on RebalanceUnmanager: EarningsRebalancer gates
its trigger, InitialRebalancer gates its run, and JitRebalancer gates
the top of htlc_accepted so that in off mode it does not defer the HTLC
and adds no forwarding latency.  A header-only Boss::ModG::
RebalanceModeProxy provides get_mode for the gate sites.  off composes
with the existing per-peer unmanage balance tag: off wins globally,
otherwise the per-peer tag still excludes specific peers.

The three rebalancers' unit tests now install a RebalanceModeManager on
the test bus so the self-gate query is answered (default classic, so
they behave as before).  Without a responder the RequestRebalanceMode
ReqResp is never satisfied and leaks, which the valgrind-checked tests
flag as a failure.

New files: Boss/RebalanceMode.hpp, Boss/Msg/RequestRebalanceMode.hpp,
Boss/Msg/ResponseRebalanceMode.hpp, Boss/ModG/RebalanceModeProxy.hpp,
Boss/Mod/RebalanceModeManager.{hpp,cpp}.
2026-06-23 14:12:03 -07:00
..
bitcoin Bitcoin/addr_to_scriptPubKey.cpp: Make a little more robust, add BIP173 test vectors. 2020-09-24 14:36:02 +08:00
boltz Boltz/Detail/match_lockscript.cpp: Function to check if the BOLTZ instance gave correct redeemscript. 2020-09-21 15:32:25 +08:00
boss Add rebalancer mode selector (classic/off) as a dynamic option 2026-06-23 14:12:03 -07:00
dnsseed Add test cases for DNS seed parser crash on SOA records (#309) 2026-03-23 11:06:27 -07:00
ev tests: Cover more paths to try_schedule_cleanup 2026-01-21 11:40:43 -08:00
graph Graph/Dijkstra.hpp: Shortest-path-tree algorithm. 2020-10-02 12:10:52 +08:00
jsmn add Jsmn::Object::operator== 2024-09-25 13:23:04 -05:00
json Json/Out.hpp: JSON output. 2020-09-07 16:03:21 +08:00
ln *: Use Ln::CommandId for command IDs for received commands and hook events. 2022-11-23 00:36:43 +08:00
net Net/IPAddrOrOnion.cpp: Data type that could be either an IP address or onion hidden service. 2020-12-30 23:14:10 +00:00
ripemd160 tests/ripemd160/test_ripemd160.cpp: Check our understanding of endianness is correct. 2020-09-21 15:44:33 +08:00
s Ev/Io.hpp: Avoid copying objects, just move things around. 2020-09-14 09:12:46 +08:00
sha256 Sha256/HasherStream.cpp: std::ostream implementation of hasher. 2020-09-20 13:53:02 +08:00
sqlite3 Sqlite3*: Complete SQLITE3 support. 2020-09-12 15:29:03 +08:00
stats Stats/ReservoirSampler.hpp: Reservoir sampler implementation. 2020-10-01 16:51:59 +08:00
util feat: add clang C++20 build job to CI 2026-03-04 11:24:31 -08:00
test_uuid.cpp Uuid.cpp: Universally-unique identifiers. 2020-09-27 19:16:57 +08:00