channeld/dualopend/lightningd: use channel_ready everywhere.

This alters the billboard, but that's a human-readable thing so not
noted in CHANGELOG.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `listpeers` `status` now refers to "channel ready" rather than "funding locked" (BOLT language change for zeroconf channels)
Changelog-Added: JSON-RPC: `channel_opened` notification `channel_ready` flag.
Changelog-Deprecated: JSON-RPC: `channel_opened` notification `funding_locked` flag (use `channel_ready`: BOLTs namechange).
This commit is contained in:
Rusty Russell
2022-09-10 11:41:31 +09:30
parent 1b30ea4b82
commit 5b7f14a7cb
13 changed files with 37 additions and 35 deletions

View File

@@ -201,13 +201,15 @@ static void channel_opened_notification_serialize(struct json_stream *stream,
struct node_id *node_id,
struct amount_sat *funding_sat,
struct bitcoin_txid *funding_txid,
bool funding_locked)
bool channel_ready)
{
json_object_start(stream, "channel_opened");
json_add_node_id(stream, "id", node_id);
json_add_amount_sats_deprecated(stream, "amount", "funding_msat", *funding_sat);
json_add_txid(stream, "funding_txid", funding_txid);
json_add_bool(stream, "funding_locked", funding_locked);
if (deprecated_apis)
json_add_bool(stream, "funding_locked", channel_ready);
json_add_bool(stream, "channel_ready", channel_ready);
json_object_end(stream);
}
@@ -216,7 +218,7 @@ REGISTER_NOTIFICATION(channel_opened,
void notify_channel_opened(struct lightningd *ld, struct node_id *node_id,
struct amount_sat *funding_sat, struct bitcoin_txid *funding_txid,
bool funding_locked)
bool channel_ready)
{
void (*serialize)(struct json_stream *,
struct node_id *,
@@ -226,7 +228,7 @@ void notify_channel_opened(struct lightningd *ld, struct node_id *node_id,
struct jsonrpc_notification *n
= jsonrpc_notification_start(NULL, channel_opened_notification_gen.topic);
serialize(n->stream, node_id, funding_sat, funding_txid, funding_locked);
serialize(n->stream, node_id, funding_sat, funding_txid, channel_ready);
jsonrpc_notification_end(n);
plugins_notify(ld->plugins, take(n));
}