common: allow subdaemons to specify the node_id in status messages.

This is ignored in subdaemons which are per-peer, but very useful for
multi-peer daemons like connectd and gossipd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-11-17 22:12:33 +10:30
parent e433d4ddc1
commit 00cb5adfe6
28 changed files with 140 additions and 60 deletions

View File

@@ -39,7 +39,7 @@ static struct io_plan *peer_init_received(struct io_conn *conn,
if (!msg)
return io_close(conn);
status_peer_io(LOG_IO_IN, msg);
status_peer_io(LOG_IO_IN, &peer->id, msg);
/* BOLT #1:
*
@@ -168,7 +168,7 @@ struct io_plan *peer_exchange_initmsg(struct io_conn *conn,
/* Features so nice, we send it twice! */
get_offered_features(tmpctx),
get_offered_features(tmpctx));
status_peer_io(LOG_IO_OUT, peer->msg);
status_peer_io(LOG_IO_OUT, &peer->id, peer->msg);
peer->msg = cryptomsg_encrypt_msg(peer, &peer->cs, take(peer->msg));
next = read_init;