mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
peer_wire_is_internal helper.
We are now going to have messages which we know about, but yet we don't handle ourselves. [ I reversed this from Adi's, as that was clearer! --RR ]
This commit is contained in:
parent
5ef49143e0
commit
66d98c327f
@ -120,6 +120,20 @@ bool is_unknown_msg_discardable(const u8 *cursor)
|
||||
return unknown_type(t) && (t & 1);
|
||||
}
|
||||
|
||||
/* Returns true if the message type should be handled by CLN's core */
|
||||
bool peer_wire_is_internal(enum peer_wire type)
|
||||
{
|
||||
/* Unknown messages are not handled by CLN */
|
||||
if (!peer_wire_is_defined(type))
|
||||
return false;
|
||||
|
||||
/* handled by pluigns */
|
||||
if (type == WIRE_PEER_STORAGE || type == WIRE_YOUR_PEER_STORAGE)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Extract channel_id from various packets, return true if possible. */
|
||||
bool extract_channel_id(const u8 *in_pkt, struct channel_id *channel_id)
|
||||
{
|
||||
|
@ -23,7 +23,8 @@
|
||||
bool is_unknown_msg_discardable(const u8 *cursor);
|
||||
/* Return true if it's a message for gossipd. */
|
||||
bool is_msg_for_gossipd(const u8 *cursor);
|
||||
|
||||
/* Returns true if the message type should be treated as a custommsg */
|
||||
bool peer_wire_is_internal(enum peer_wire type);
|
||||
/* Extract channel_id from various packets, return true if possible. */
|
||||
bool extract_channel_id(const u8 *in_pkt, struct channel_id *channel_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user