Skip to content

Commit 0dcd668

Browse files
committed
Rename struct json_result to struct json_stream (RENAMEONLY)
Signed-off-by: Rusty Russell <[email protected]>
1 parent 66dcba0 commit 0dcd668

23 files changed

+178
-178
lines changed

lightningd/chaintopology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static void json_feerates(struct command *cmd,
466466
const char *buffer, const jsmntok_t *params)
467467
{
468468
struct chain_topology *topo = cmd->ld->topology;
469-
struct json_result *response;
469+
struct json_stream *response;
470470
u32 feerates[NUM_FEERATES];
471471
bool missing;
472472
enum feerate_style *style;

lightningd/connect_control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static struct connect *find_connect(struct lightningd *ld,
6565

6666
static void connect_cmd_succeed(struct command *cmd, const struct pubkey *id)
6767
{
68-
struct json_result *response = json_stream_success(cmd);
68+
struct json_stream *response = json_stream_success(cmd);
6969
json_object_start(response, NULL);
7070
json_add_pubkey(response, "id", id);
7171
json_object_end(response);

lightningd/gossip_control.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void gossipd_notify_spend(struct lightningd *ld,
178178
}
179179

180180
/* Gossipd shouldn't give us bad pubkeys, but don't abort if they do */
181-
static void json_add_raw_pubkey(struct json_result *response,
181+
static void json_add_raw_pubkey(struct json_stream *response,
182182
const char *fieldname,
183183
const u8 raw_pubkey[sizeof(struct pubkey)])
184184
{
@@ -200,7 +200,7 @@ static void json_getnodes_reply(struct subd *gossip UNUSED, const u8 *reply,
200200
struct command *cmd)
201201
{
202202
struct gossip_getnodes_entry **nodes;
203-
struct json_result *response;
203+
struct json_stream *response;
204204
size_t i, j;
205205

206206
if (!fromwire_gossip_getnodes_reply(reply, reply, &nodes)) {
@@ -273,7 +273,7 @@ AUTODATA(json_command, &listnodes_command);
273273
static void json_getroute_reply(struct subd *gossip UNUSED, const u8 *reply, const int *fds UNUSED,
274274
struct command *cmd)
275275
{
276-
struct json_result *response;
276+
struct json_stream *response;
277277
struct route_hop *hops;
278278

279279
fromwire_gossip_getroute_reply(reply, reply, &hops);
@@ -355,7 +355,7 @@ static void json_listchannels_reply(struct subd *gossip UNUSED, const u8 *reply,
355355
{
356356
size_t i;
357357
struct gossip_getchannels_entry *entries;
358-
struct json_result *response;
358+
struct json_stream *response;
359359

360360
if (!fromwire_gossip_getchannels_reply(reply, reply, &entries)) {
361361
command_fail(cmd, LIGHTNINGD, "Invalid reply from gossipd");
@@ -425,7 +425,7 @@ static void json_scids_reply(struct subd *gossip UNUSED, const u8 *reply,
425425
const int *fds UNUSED, struct command *cmd)
426426
{
427427
bool ok, complete;
428-
struct json_result *response;
428+
struct json_stream *response;
429429

430430
if (!fromwire_gossip_scids_reply(reply, &ok, &complete)) {
431431
command_fail(cmd, LIGHTNINGD,
@@ -521,7 +521,7 @@ AUTODATA(json_command, &dev_send_timestamp_filter);
521521
static void json_channel_range_reply(struct subd *gossip UNUSED, const u8 *reply,
522522
const int *fds UNUSED, struct command *cmd)
523523
{
524-
struct json_result *response;
524+
struct json_stream *response;
525525
u32 final_first_block, final_num_blocks;
526526
bool final_complete;
527527
struct short_channel_id *scids;

lightningd/invoice.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static const char *invoice_status_str(const struct invoice_details *inv)
3737
return "unpaid";
3838
}
3939

40-
static void json_add_invoice(struct json_result *response,
40+
static void json_add_invoice(struct json_stream *response,
4141
const struct invoice_details *inv)
4242
{
4343
json_object_start(response, NULL);
@@ -64,7 +64,7 @@ static void json_add_invoice(struct json_result *response,
6464

6565
static void tell_waiter(struct command *cmd, const struct invoice *inv)
6666
{
67-
struct json_result *response;
67+
struct json_stream *response;
6868
const struct invoice_details *details;
6969

7070
details = wallet_invoice_details(cmd, cmd->ld->wallet, *inv);
@@ -213,7 +213,7 @@ static void gossipd_incoming_channels_reply(struct subd *gossipd,
213213
const int *fs,
214214
struct invoice_info *info)
215215
{
216-
struct json_result *response;
216+
struct json_stream *response;
217217
struct route_info *inchans;
218218
bool any_offline;
219219
struct invoice invoice;
@@ -390,7 +390,7 @@ static const struct json_command invoice_command = {
390390
"(default autogenerated)"};
391391
AUTODATA(json_command, &invoice_command);
392392

393-
static void json_add_invoices(struct json_result *response,
393+
static void json_add_invoices(struct json_stream *response,
394394
struct wallet *wallet,
395395
const struct json_escaped *label)
396396
{
@@ -418,7 +418,7 @@ static void json_listinvoices(struct command *cmd,
418418
const char *buffer, const jsmntok_t *params)
419419
{
420420
struct json_escaped *label;
421-
struct json_result *response;
421+
struct json_stream *response;
422422
struct wallet *wallet = cmd->ld->wallet;
423423
if (!param(cmd, buffer, params,
424424
p_opt("label", json_tok_label, &label),
@@ -445,7 +445,7 @@ static void json_delinvoice(struct command *cmd,
445445
{
446446
struct invoice i;
447447
const struct invoice_details *details;
448-
struct json_result *response;
448+
struct json_stream *response;
449449
const char *status, *actual_status;
450450
struct json_escaped *label;
451451
struct wallet *wallet = cmd->ld->wallet;
@@ -612,7 +612,7 @@ static const struct json_command waitinvoice_command = {
612612
};
613613
AUTODATA(json_command, &waitinvoice_command);
614614

615-
static void json_add_fallback(struct json_result *response,
615+
static void json_add_fallback(struct json_stream *response,
616616
const char *fieldname,
617617
const u8 *fallback,
618618
const struct chainparams *chain)
@@ -651,7 +651,7 @@ static void json_decodepay(struct command *cmd,
651651
const char *buffer, const jsmntok_t *params)
652652
{
653653
struct bolt11 *b11;
654-
struct json_result *response;
654+
struct json_stream *response;
655655
const char *str, *desc;
656656
char *fail;
657657

0 commit comments

Comments
 (0)