Skip to content

Commit 363c378

Browse files
committed
jsonrpc: Add option_zeroconf handling to listpeers
1 parent 1d0d51a commit 363c378

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

doc/lightning-listpeers.7.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ On success, an object containing **peers** is returned. It is an array of objec
4646
- **state** (string): the channel state, in particular "CHANNELD_NORMAL" means the channel can be used normally (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN")
4747
- **opener** (string): Who initiated the channel (one of "local", "remote")
4848
- **features** (array of strings):
49-
- BOLT #9 features which apply to this channel (one of "option_static_remotekey", "option_anchor_outputs")
49+
- BOLT #9 features which apply to this channel (one of "option_static_remotekey", "option_anchor_outputs", "option_zeroconf")
5050
- **scratch_txid** (txid, optional): The txid we would use if we went onchain now
5151
- **feerate** (object, optional): Feerates for the current tx:
5252
- **perkw** (u32): Feerate per 1000 weight (i.e kSipa)
@@ -381,4 +381,4 @@ Main web site: <https://github.com/ElementsProject/lightning> Lightning
381381
RFC site (BOLT \#9):
382382
<https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md>
383383

384-
[comment]: # ( SHA256STAMP:e6829e8ced923131b95bcfa4f366dd04286fe85485039e9ebc89e79899937df6)
384+
[comment]: # ( SHA256STAMP:2e8bcc66531b2dce44b94c42852b624bdd9435cc63495fc799458fa5522f0ea9)

doc/schemas/listpeers.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@
327327
"type": "string",
328328
"enum": [
329329
"option_static_remotekey",
330-
"option_anchor_outputs"
330+
"option_anchor_outputs",
331+
"option_zeroconf"
331332
],
332333
"description": "BOLT #9 features which apply to this channel"
333334
}

lightningd/peer_control.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,8 @@ static void json_add_channel(struct lightningd *ld,
749749
json_add_string(response, NULL, "option_static_remotekey");
750750
if (channel_has(channel, OPT_ANCHOR_OUTPUTS))
751751
json_add_string(response, NULL, "option_anchor_outputs");
752+
if (channel_has(channel, OPT_ZEROCONF))
753+
json_add_string(response, NULL, "option_zeroconf");
752754
json_array_end(response);
753755

754756
if (!amount_sat_sub(&peer_funded_sats, channel->funding_sats,

0 commit comments

Comments
 (0)