lightningd: actually deprecate old close fields.

Changelog-Deprecated: `close` `tx` and `txid` field (use `txs` and `txids`)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-11-17 14:31:05 +10:30
parent c79a89d557
commit c4cbb8671a
4 changed files with 6 additions and 6 deletions

View File

@ -5599,8 +5599,6 @@
"then": {
"additionalProperties": false,
"required": [
"tx",
"txid",
"txs",
"txids"
],

View File

@ -34,6 +34,8 @@ hidden: false
| decode.blinding | Field | v24.11 | v25.05 | Renamed to `first_path_key` in BOLT 4 (available in `decode` from v24.11) |
| onion_message_recv.blinding | Hook Field | v24.11 | v25.05 | Renamed to `first_path_key` in BOLT 4 (available in hook from v24.11) |
| decodepay | Command | v24.11 | v25.11 | Use `decode` which is more powerful (since v23.05) |
| close.tx | Field | v24.11 | v25.11 | Use txs array instead |
| close.txid | Field | v24.11 | v25.11 | Use txids array instead |
Inevitably there are features which need to change: either to be generalized, or removed when they can no longer be supported.

View File

@ -106,8 +106,6 @@
"then": {
"additionalProperties": false,
"required": [
"tx",
"txid",
"txs",
"txids"
],

View File

@ -58,10 +58,12 @@ resolve_one_close_command(struct close_command *cc, bool cooperative,
struct json_stream *result = json_stream_success(cc->cmd);
const struct bitcoin_tx *close_tx = close_txs[tal_count(close_txs) - 1];
if (command_deprecated_out_ok(cc->cmd, "tx", "v24.11", "v25.11"))
json_add_tx(result, "tx", close_tx);
if (!invalid_last_tx(close_tx)) {
struct bitcoin_txid txid;
bitcoin_txid(close_tx, &txid);
if (command_deprecated_out_ok(cc->cmd, "txid", "v24.11", "v25.11"))
json_add_txid(result, "txid", &txid);
}