core-lightning/common/read_peer_msg.h
Rusty Russell b968b18534 common: move is_peer_error/is_peer_warning from read_peer_msg.c to wire_error.c
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-23 15:48:50 +10:30

24 lines
695 B
C

#ifndef LIGHTNING_COMMON_READ_PEER_MSG_H
#define LIGHTNING_COMMON_READ_PEER_MSG_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
struct crypto_state;
struct channel_id;
struct per_peer_state;
/**
* handle_peer_error_or_warning - simple handler for errors / warnings
* @pps: per-peer state.
* @channel_id: the channel id of the current channel.
* @msg: the peer message (only taken if returns true).
*
* This returns true if it handled the packet (i.e. logs a warning).
* Doesn't return if it's an error.
*/
bool handle_peer_error_or_warning(struct per_peer_state *pps,
const u8 *msg TAKES);
#endif /* LIGHTNING_COMMON_READ_PEER_MSG_H */