diff --git a/common/status.c b/common/status.c index 61fbdc3ef..499484c39 100644 --- a/common/status.c +++ b/common/status.c @@ -98,13 +98,25 @@ static void status_io_full(enum log_level iodir, status_send(take(towire_status_io(NULL, iodir, peer, who, p))); } +static bool status_peer_io_filter_packettype(const u8 *p) +{ + int msg_type = fromwire_peektype(p); + switch (msg_type) { + case WIRE_PING: + case WIRE_PONG: + return true; + } + return false; +} + static void status_peer_io_short(enum log_level iodir, const struct node_id *peer, const u8 *p) { - status_peer_debug(peer, "%s %s", - iodir == LOG_IO_OUT ? "peer_out" : "peer_in", - peer_wire_name(fromwire_peektype(p))); + if (!status_peer_io_filter_packettype(p)) + status_peer_debug(peer, "%s %s", + iodir == LOG_IO_OUT ? "peer_out" : "peer_in", + peer_wire_name(fromwire_peektype(p))); } void status_peer_io(enum log_level iodir,