diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 4c6f6e6a1..1653ac98a 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -802,6 +802,16 @@ static void json_add_channel(struct lightningd *ld, response, "private", !(channel->channel_flags & CHANNEL_FLAGS_ANNOUNCE_CHANNEL)); + /* opener and closer */ + assert(channel->opener != NUM_SIDES); + json_add_string(response, "opener", channel->opener == LOCAL ? + "local" : "remote"); + if (channel->closer != NUM_SIDES) + json_add_string(response, "closer", channel->closer == LOCAL ? + "local" : "remote"); + else + json_add_null(response, "closer"); + json_array_start(response, "features"); if (channel->option_static_remotekey) json_add_string(response, NULL, "option_static_remotekey"); diff --git a/wallet/db_postgres_sqlgen.c b/wallet/db_postgres_sqlgen.c index 1a0149642..51a972333 100644 --- a/wallet/db_postgres_sqlgen.c +++ b/wallet/db_postgres_sqlgen.c @@ -1672,4 +1672,4 @@ struct db_query db_postgres_queries[] = { #endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */ -// SHA256STAMP:6a3645b429a4a9b7906003179a77361d5c46fc7690c895429c1b3cac72acfd92 +// SHA256STAMP:e101a44fa0daaa4c1118759cc19d3b1b31dedfe85cf0cf3502bd41f939e55634 diff --git a/wallet/db_sqlite3_sqlgen.c b/wallet/db_sqlite3_sqlgen.c index a98fe3ba2..5ff1b040d 100644 --- a/wallet/db_sqlite3_sqlgen.c +++ b/wallet/db_sqlite3_sqlgen.c @@ -1672,4 +1672,4 @@ struct db_query db_sqlite3_queries[] = { #endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */ -// SHA256STAMP:6a3645b429a4a9b7906003179a77361d5c46fc7690c895429c1b3cac72acfd92 +// SHA256STAMP:e101a44fa0daaa4c1118759cc19d3b1b31dedfe85cf0cf3502bd41f939e55634 diff --git a/wallet/statements_gettextgen.po b/wallet/statements_gettextgen.po index 19d8e059f..737544f75 100644 --- a/wallet/statements_gettextgen.po +++ b/wallet/statements_gettextgen.po @@ -1098,7 +1098,7 @@ msgstr "" msgid "not a valid SQL statement" msgstr "" -#: wallet/test/run-wallet.c:1367 +#: wallet/test/run-wallet.c:1370 msgid "INSERT INTO channels (id) VALUES (1);" msgstr "" -# SHA256STAMP:dc49fb9d8f77f85e9ca780fbb5dc1f9f764fb66653a929fd57d225115dc93bf6 +# SHA256STAMP:0c250c26e1bcb07604d3665155ac7b6edd68904f0cb536b8ccbd0191582d75d5 diff --git a/wallet/test/run-wallet.c b/wallet/test/run-wallet.c index b5f56b0f3..309275429 100644 --- a/wallet/test/run-wallet.c +++ b/wallet/test/run-wallet.c @@ -287,6 +287,9 @@ void json_add_node_id(struct json_stream *response UNNEEDED, const char *fieldname UNNEEDED, const struct node_id *id UNNEEDED) { fprintf(stderr, "json_add_node_id called!\n"); abort(); } +/* Generated stub for json_add_null */ +void json_add_null(struct json_stream *stream UNNEEDED, const char *fieldname UNNEEDED) +{ fprintf(stderr, "json_add_null called!\n"); abort(); } /* Generated stub for json_add_num */ void json_add_num(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED, unsigned int value UNNEEDED)