bkpr: expose struct bkpr to outside bookkeeper.c.
We're going to add more members here, so we will start handing around the whole thing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -20,6 +20,7 @@ BOOKKEEPER_SRC := $(BOOKKEEPER_PLUGIN_SRC) $(BOOKKEEPER_DB_QUERIES)
|
||||
BOOKKEEPER_HEADER := \
|
||||
plugins/bkpr/account.h \
|
||||
plugins/bkpr/account_entry.h \
|
||||
plugins/bkpr/bookkeeper.h \
|
||||
plugins/bkpr/chain_event.h \
|
||||
plugins/bkpr/channel_event.h \
|
||||
plugins/bkpr/channelsapy.h \
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <errno.h>
|
||||
#include <plugins/bkpr/account.h>
|
||||
#include <plugins/bkpr/account_entry.h>
|
||||
#include <plugins/bkpr/bookkeeper.h>
|
||||
#include <plugins/bkpr/chain_event.h>
|
||||
#include <plugins/bkpr/channel_event.h>
|
||||
#include <plugins/bkpr/channelsapy.h>
|
||||
@@ -30,14 +31,6 @@
|
||||
#define CHAIN_MOVE "chain_mvt"
|
||||
#define CHANNEL_MOVE "channel_mvt"
|
||||
|
||||
struct bkpr {
|
||||
/* The database that we store all the accounting data in */
|
||||
struct db *db;
|
||||
|
||||
char *db_dsn;
|
||||
char *datadir;
|
||||
};
|
||||
|
||||
static struct bkpr *bkpr_of(struct plugin *plugin)
|
||||
{
|
||||
return plugin_get_data(plugin, struct bkpr);
|
||||
|
||||
14
plugins/bkpr/bookkeeper.h
Normal file
14
plugins/bkpr/bookkeeper.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef LIGHTNING_PLUGINS_BKPR_BOOKKEEPER_H
|
||||
#define LIGHTNING_PLUGINS_BKPR_BOOKKEEPER_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
struct bkpr {
|
||||
/* The database that we store all the accounting data in */
|
||||
struct db *db;
|
||||
|
||||
char *db_dsn;
|
||||
char *datadir;
|
||||
};
|
||||
|
||||
#endif /* LIGHTNING_PLUGINS_BKPR_BOOKKEEPER_H */
|
||||
Reference in New Issue
Block a user