mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-28 02:04:21 +01:00
plugin: Add pointer to jsonrpc so we can add new methods
Signed-off-by: Christian Decker <@cdecker>
This commit is contained in:
committed by
Rusty Russell
parent
83775e7cea
commit
3e1138951b
@@ -59,6 +59,9 @@ struct plugins {
|
||||
UINTMAP(struct plugin_request *) pending_requests;
|
||||
struct log *log;
|
||||
struct log_book *log_book;
|
||||
|
||||
/* RPC interface to bind JSON-RPC methods to */
|
||||
struct jsonrpc *rpc;
|
||||
};
|
||||
|
||||
struct json_output {
|
||||
@@ -75,12 +78,15 @@ struct plugin_opt {
|
||||
char *value;
|
||||
};
|
||||
|
||||
struct plugins *plugins_new(const tal_t *ctx, struct log_book *log_book){
|
||||
struct plugins *plugins_new(const tal_t *ctx, struct log_book *log_book,
|
||||
struct jsonrpc *rpc)
|
||||
{
|
||||
struct plugins *p;
|
||||
p = tal(ctx, struct plugins);
|
||||
list_head_init(&p->plugins);
|
||||
p->log_book = log_book;
|
||||
p->log = new_log(p, log_book, "plugin-manager");
|
||||
p->rpc = rpc;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user