cleanup: fix mixed indentation of json_getinfo

This one got badly messed up over time. I know we usually don't fix
these to have easier git-bisect. I can remove this commit if required.
This commit is contained in:
Michael Schmoock
2022-09-11 11:08:22 +02:00
parent ec95c7c18c
commit c6858748bb

View File

@@ -2252,11 +2252,17 @@ static struct command_result *json_getinfo(struct command *cmd,
* See `create_node_announcement` in `gossip_generation.c`. */
if (count_announceable == 0) {
if (cmd->ld->remote_addr_v4 != NULL &&
!wireaddr_arr_contains(cmd->ld->announceable, cmd->ld->remote_addr_v4))
json_add_address(response, NULL, cmd->ld->remote_addr_v4);
!wireaddr_arr_contains(
cmd->ld->announceable,
cmd->ld->remote_addr_v4))
json_add_address(response, NULL,
cmd->ld->remote_addr_v4);
if (cmd->ld->remote_addr_v6 != NULL &&
!wireaddr_arr_contains(cmd->ld->announceable, cmd->ld->remote_addr_v6))
json_add_address(response, NULL, cmd->ld->remote_addr_v6);
!wireaddr_arr_contains(
cmd->ld->announceable,
cmd->ld->remote_addr_v6))
json_add_address(response, NULL,
cmd->ld->remote_addr_v6);
}
json_array_end(response);
@@ -2286,7 +2292,9 @@ static struct command_result *json_getinfo(struct command *cmd,
u8 **bits = cmd->ld->our_features->bits;
json_object_start(response, "our_features");
json_add_hex_talarr(response, "init",
featurebits_or(cmd, bits[INIT_FEATURE], bits[GLOBAL_INIT_FEATURE]));
featurebits_or(cmd,
bits[INIT_FEATURE],
bits[GLOBAL_INIT_FEATURE]));
json_add_hex_talarr(response, "node", bits[NODE_ANNOUNCE_FEATURE]);
json_add_hex_talarr(response, "channel", bits[CHANNEL_FEATURE]);
json_add_hex_talarr(response, "invoice", bits[BOLT11_FEATURE]);