mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
wire: Add common messages that are independent of daemons
These messages may be exchanged between the master and any daemon. For now these are just the daemons that a peer may be attached to at any time since the first example of this is the custommsg infrastructure.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <lightningd/plugin_hook.h>
|
||||
#include <lightningd/subd.h>
|
||||
#include <openingd/gen_opening_wire.h>
|
||||
#include <wire/gen_common_wire.h>
|
||||
#include <wire/wire.h>
|
||||
#include <wire/wire_sync.h>
|
||||
|
||||
@@ -922,6 +923,20 @@ static unsigned int openingd_msg(struct subd *openingd,
|
||||
case WIRE_OPENING_DEV_MEMLEAK_REPLY:
|
||||
break;
|
||||
}
|
||||
|
||||
switch ((enum common_wire_type)t) {
|
||||
#if DEVELOPER
|
||||
case WIRE_CUSTOMMSG_IN:
|
||||
/* TODO(cdecker) Add handling of custom messages. */
|
||||
return 0;
|
||||
#else
|
||||
case WIRE_CUSTOMMSG_IN:
|
||||
#endif
|
||||
/* We send these. */
|
||||
case WIRE_CUSTOMMSG_OUT:
|
||||
break;
|
||||
}
|
||||
|
||||
log_broken(openingd->log, "Unexpected msg %s: %s",
|
||||
opening_wire_type_name(t), tal_hex(tmpctx, msg));
|
||||
tal_free(openingd);
|
||||
|
||||
Reference in New Issue
Block a user