mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
channeld: Added tracing of incoming and outgoing messages
Makes it easier to search for messages being exchanged when testing.
This commit is contained in:
parent
8e98e438e9
commit
f4cf485f00
1 changed files with 2 additions and 0 deletions
|
@ -236,6 +236,7 @@ static struct io_plan *peer_out(struct io_conn *conn, struct peer *peer)
|
||||||
if (!out)
|
if (!out)
|
||||||
return msg_queue_wait(conn, &peer->peer_out, peer_out, peer);
|
return msg_queue_wait(conn, &peer->peer_out, peer_out, peer);
|
||||||
|
|
||||||
|
status_trace("peer_out %s", wire_type_name(fromwire_peektype(out)));
|
||||||
return peer_write_message(conn, &peer->pcs, out, peer_out);
|
return peer_write_message(conn, &peer->pcs, out, peer_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -821,6 +822,7 @@ static void handle_peer_fail_htlc(struct peer *peer, const u8 *msg)
|
||||||
static struct io_plan *peer_in(struct io_conn *conn, struct peer *peer, u8 *msg)
|
static struct io_plan *peer_in(struct io_conn *conn, struct peer *peer, u8 *msg)
|
||||||
{
|
{
|
||||||
enum wire_type type = fromwire_peektype(msg);
|
enum wire_type type = fromwire_peektype(msg);
|
||||||
|
status_trace("peer_in %s", wire_type_name(type));
|
||||||
|
|
||||||
/* Must get funding_locked before almost anything. */
|
/* Must get funding_locked before almost anything. */
|
||||||
if (!peer->funding_locked[REMOTE]) {
|
if (!peer->funding_locked[REMOTE]) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue