clboss/tests
Ken Sedgwick d978de9d84
ChannelCreateDestroyMonitor: tolerate missing old_state (CLN v26.06)
CLN's channel_state_changed notification used to emit the sentinel
value "unknown" for old_state when there was no previous state.
That value was deprecated in v25.05 and is last-supported in v26.04;
as of v26.06 the old_state field is simply omitted instead (see
doc/developers-guide/deprecated-features.md, entry
"channel_state_changed.old_state.unknown").

The notification handler unconditionally extracted old_state, which
throws Jsmn::TypeError when the field is absent.  The throw was
caught by the surrounding handler, logged as Error
("Unexpected channel_state_changed payload: ..."), and then the
handler returned without taking action.  Functional behavior was
unchanged compared to the legacy "unknown" path (both result in
no destruction event), but the new release variant produced noisy
Error log lines for every state-changed notification on nodes
running v26.06+.

Add an explicit has() check and leave old_state as the default
empty string when absent.  The empty string will not match either
"CHANNELD_NORMAL" or "CHANNELD_AWAITING_LOCKIN", so the handler
falls through to the no-op return -- the same outcome the legacy
catch-and-log path produced, but silently.

This is the third and final commit of the v26.06 compatibility
PR (preceded by the Dowser and Matchmaker/ActiveProber commits).
2026-07-02 11:57:02 -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 ChannelCreateDestroyMonitor: tolerate missing old_state (CLN v26.06) 2026-07-02 11:57:02 -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