Skip to content

Commit b485a02

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
rpc: Removing description from json_command struct
1 parent 89c182e commit b485a02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+126
-320
lines changed

cli/lightning-cli.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,9 @@ static void human_help(char *buffer, const jsmntok_t *result)
179179
unsigned int i;
180180
/* `curr` is used as a temporary token */
181181
const jsmntok_t *curr;
182-
const char *prev_cat;
183182
/* Contains all commands objects, which have the following structure :
184183
* {
185-
* "command": "The command name and usage",
186-
* "description": "The command's description"
184+
* "command": "The command name and usage"
187185
* }
188186
*/
189187
const jsmntok_t * help_array = json_get_member(buffer, result, "help");
@@ -196,22 +194,11 @@ static void human_help(char *buffer, const jsmntok_t *result)
196194

197195
asort(help, tal_count(help), compare_help, buffer);
198196

199-
prev_cat = "";
200197
for (i = 0; i < tal_count(help); i++) {
201-
const jsmntok_t *category, *command, *desc;
202-
203-
category = json_get_member(buffer, help[i], "category");
204-
if (category && !json_tok_streq(buffer, category, prev_cat)) {
205-
prev_cat = json_strdup(help, buffer, category);
206-
printf("=== %s ===\n\n", prev_cat);
207-
}
208-
198+
const jsmntok_t *command;
209199
command = json_get_member(buffer, help[i], "command");
210-
desc = json_get_member(buffer, help[i], "description");
211-
printf("%.*s\n",
200+
printf("%.*s\n\n",
212201
command->end - command->start, buffer + command->start);
213-
printf(" %.*s\n\n",
214-
desc->end - desc->start, buffer + desc->start);
215202
}
216203
tal_free(help);
217204

cln-grpc/proto/node.proto

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-rpc/src/model.rs

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/msggen/msggen/schema.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12567,21 +12567,14 @@
1256712567
"type": "object",
1256812568
"additionalProperties": true,
1256912569
"required": [
12570-
"command",
12571-
"description"
12570+
"command"
1257212571
],
1257312572
"properties": {
1257412573
"command": {
1257512574
"type": "string",
1257612575
"description": [
1257712576
"The command."
1257812577
]
12579-
},
12580-
"description": {
12581-
"type": "string",
12582-
"description": [
12583-
"A one-line description of the purpose of this command."
12584-
]
1258512578
}
1258612579
}
1258712580
}
@@ -12621,8 +12614,7 @@
1262112614
"response": {
1262212615
"help": [
1262312616
{
12624-
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]",
12625-
"description": "Send payment specified by {bolt11}"
12617+
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]"
1262612618
}
1262712619
],
1262812620
"format-hint": "simple"
@@ -12639,8 +12631,7 @@
1263912631
"response": {
1264012632
"help": [
1264112633
{
12642-
"command": "dev subcommand=crash|rhash|slowcmd",
12643-
"description": "Developer command test multiplexer"
12634+
"command": "dev subcommand=crash|rhash|slowcmd"
1264412635
}
1264512636
],
1264612637
"format-hint": "simple"

contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Lines changed: 108 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/pyln-testing/pyln/testing/grpc2py.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,6 @@ def stop2py(m):
26182618
def help_help2py(m):
26192619
return remove_default({
26202620
"command": m.command, # PrimitiveField in generate_composite
2621-
"description": m.description, # PrimitiveField in generate_composite
26222621
})
26232622

26242623

doc/schemas/lightning-help.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,14 @@
3131
"type": "object",
3232
"additionalProperties": true,
3333
"required": [
34-
"command",
35-
"description"
34+
"command"
3635
],
3736
"properties": {
3837
"command": {
3938
"type": "string",
4039
"description": [
4140
"The command."
4241
]
43-
},
44-
"description": {
45-
"type": "string",
46-
"description": [
47-
"A one-line description of the purpose of this command."
48-
]
4942
}
5043
}
5144
}
@@ -85,8 +78,7 @@
8578
"response": {
8679
"help": [
8780
{
88-
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]",
89-
"description": "Send payment specified by {bolt11}"
81+
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]"
9082
}
9183
],
9284
"format-hint": "simple"
@@ -103,8 +95,7 @@
10395
"response": {
10496
"help": [
10597
{
106-
"command": "dev subcommand=crash|rhash|slowcmd",
107-
"description": "Developer command test multiplexer"
98+
"command": "dev subcommand=crash|rhash|slowcmd"
10899
}
109100
],
110101
"format-hint": "simple"

lightningd/chaintopology.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,6 @@ static struct command_result *json_feerates(struct command *cmd,
756756
static const struct json_command feerates_command = {
757757
"feerates",
758758
json_feerates,
759-
"Return feerate estimates, either satoshi-per-kw ({style} perkw) or satoshi-per-kb ({style} perkb)."
760759
};
761760
AUTODATA(json_command, &feerates_command);
762761

@@ -782,7 +781,6 @@ static struct command_result *json_parse_feerate(struct command *cmd,
782781
static const struct json_command parse_feerate_command = {
783782
"parsefeerate",
784783
json_parse_feerate,
785-
"Return current feerate in perkw + perkb for given feerate string."
786784
};
787785
AUTODATA(json_command, &parse_feerate_command);
788786

lightningd/channel_control.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,27 +2199,18 @@ static struct command_result *json_splice_signed(struct command *cmd,
21992199
static const struct json_command splice_init_command = {
22002200
"splice_init",
22012201
json_splice_init,
2202-
"Init a channel splice to {channel_id} for {relative_amount} satoshis with {initialpsbt}. "
2203-
"Returns updated {psbt} with (partial) contributions from peer"
22042202
};
22052203
AUTODATA(json_command, &splice_init_command);
22062204

22072205
static const struct json_command splice_update_command = {
22082206
"splice_update",
22092207
json_splice_update,
2210-
"Update {channel_id} currently active negotiated splice with {psbt}. "
2211-
""
2212-
"Returns updated {psbt} with (partial) contributions from peer. "
2213-
"If {commitments_secured} is true, next call may be to splicechannel_finalize, "
2214-
"otherwise keep calling splice_update passing back in the returned PSBT until "
2215-
"{commitments_secured} is true."
22162208
};
22172209
AUTODATA(json_command, &splice_update_command);
22182210

22192211
static const struct json_command splice_signed_command = {
22202212
"splice_signed",
22212213
json_splice_signed,
2222-
"Send our {signed_psbt}'s tx sigs for {channel_id}."
22232214
};
22242215
AUTODATA(json_command, &splice_signed_command);
22252216

@@ -2272,7 +2263,6 @@ static struct command_result *json_dev_feerate(struct command *cmd,
22722263
static const struct json_command dev_feerate_command = {
22732264
"dev-feerate",
22742265
json_dev_feerate,
2275-
"Set feerate for {id} to {feerate}",
22762266
.dev_only = true,
22772267
};
22782268
AUTODATA(json_command, &dev_feerate_command);
@@ -2328,7 +2318,6 @@ static struct command_result *json_dev_quiesce(struct command *cmd,
23282318
static const struct json_command dev_quiesce_command = {
23292319
"dev-quiesce",
23302320
json_dev_quiesce,
2331-
"Initiate quiscence protocol with peer",
23322321
.dev_only = true,
23332322
};
23342323
AUTODATA(json_command, &dev_quiesce_command);

0 commit comments

Comments
 (0)