lightningd: deprecate null short_channel_id and unknown old_state in channel_state_changed notification

We always prefer to omit fields rather than use 'null' (or unknown!).

Note that before this, the schema was broken, so we have to put a special
exemption in for that case.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-08-17 09:38:52 +09:30
parent 0456bace5d
commit a686bda4cb
9 changed files with 24 additions and 21 deletions

View File

@@ -21,6 +21,7 @@ hidden: false
| coin_movement.tags | Notification Field | v25.09 | v26.09 | Use `primary_tag` (first tag) and `extra_tags` instead |
| coin_movement.utxo_txid | Notification Field | v25.09 | v26.09 | Use `utxo` instead of `utxo_txid` & `vout` |
| coin_movement.txid | Notification Field | v25.09 | v26.09 | Use `spending_txid` instead |
| channel_state_changed.null_scid | Notification Field | v25.09 | v26.09 | In channel_state_changed notification, `short_channel_id` will be missing instead of `null` |
Inevitably there are features which need to change: either to be generalized, or removed when they can no longer be supported.

View File

@@ -13,7 +13,6 @@
"required": [
"peer_id",
"channel_id",
"short_channel_id",
"timestamp",
"new_state",
"cause",
@@ -67,7 +66,7 @@
"DUALOPEND_OPEN_COMMIT_READY"
],
"description": [
"The channel state, in particular \"CHANNELD_NORMAL\" means the channel can be used normally.",
"The channel state, in particular \"CHANNELD_NORMAL\" and \"CHANNELD_AWAITING_SPLICE\" mean the channel can be used normally.",
"The deprecated value 'unknown' is also present for new channels: after v26.03 this field will be omitted instead."
],
"added": "pre-v0.10.1"
@@ -91,7 +90,7 @@
"DUALOPEND_OPEN_COMMIT_READY"
],
"description": [
"The channel state, in particular \"CHANNELD_NORMAL\" means the channel can be used normally"
"The channel state, in particular \"CHANNELD_NORMAL\" and \"CHANNELD_AWAITING_SPLICE\" mean the channel can be used normally"
],
"added": "pre-v0.10.1"
},