plugins/offers: add code to catch invoice_request onion messages.

We prepare an invoice, but there's no code to send an error reply yet
(future patch).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-12-16 13:43:32 +10:30
committed by Christian Decker
parent 08e110b568
commit 9d75fbe237
4 changed files with 815 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
#ifndef LIGHTNING_PLUGINS_OFFERS_INVREQ_HOOK_H
#define LIGHTNING_PLUGINS_OFFERS_INVREQ_HOOK_H
#include "config.h"
#include <plugins/libplugin.h>
extern u32 cltv_final;
/* We got an onionmessage with an invreq! */
struct command_result *handle_invoice_request(struct command *cmd,
const char *buf,
const jsmntok_t *invreqtok,
const jsmntok_t *replytok);
#endif /* LIGHTNING_PLUGINS_OFFERS_INVREQ_HOOK_H */