mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
connectd: make exception for peer storage msgs.
This commit is contained in:
parent
66d98c327f
commit
709ff01fd2
2 changed files with 4 additions and 2 deletions
|
@ -723,7 +723,7 @@ static bool handle_custommsg(struct daemon *daemon,
|
|||
const u8 *msg)
|
||||
{
|
||||
enum peer_wire type = fromwire_peektype(msg);
|
||||
if (type % 2 == 1 && !peer_wire_is_defined(type)) {
|
||||
if (type % 2 == 1 && !peer_wire_is_internal(type)) {
|
||||
/* The message is not part of the messages we know how to
|
||||
* handle. Assuming this is a custommsg, we just forward it to the
|
||||
* master. */
|
||||
|
|
|
@ -752,7 +752,9 @@ static struct command_result *json_sendcustommsg(struct command *cmd,
|
|||
return command_param_failed();
|
||||
|
||||
type = fromwire_peektype(msg);
|
||||
if (peer_wire_is_defined(type)) {
|
||||
|
||||
/* Allow peer_storage and your_peer_storage msgtypes */
|
||||
if (peer_wire_is_internal(type)) {
|
||||
return command_fail(
|
||||
cmd, JSONRPC2_INVALID_REQUEST,
|
||||
"Cannot send messages of type %d (%s). It is not possible "
|
||||
|
|
Loading…
Add table
Reference in a new issue