mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
wallet: Move the struct db definition to db_common.h
All drivers will have to reach into it, so put it in a place that is reachable from the drivers, along with all other definitions. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
e04772ec9c
commit
455aa48da0
2 changed files with 18 additions and 15 deletions
15
wallet/db.c
15
wallet/db.c
|
@ -19,21 +19,6 @@ struct migration {
|
|||
void (*func)(struct lightningd *ld, struct db *db);
|
||||
};
|
||||
|
||||
struct db {
|
||||
char *filename;
|
||||
const char *in_transaction;
|
||||
sqlite3 *sql;
|
||||
|
||||
/* DB-specific context */
|
||||
void *conn;
|
||||
|
||||
/* The configuration, including translated queries for the current
|
||||
* instance. */
|
||||
const struct db_config *config;
|
||||
|
||||
const char **changes;
|
||||
};
|
||||
|
||||
void migrate_pr2342_feerate_per_channel(struct lightningd *ld, struct db *db);
|
||||
|
||||
/* Do not reorder or remove elements from this array, it is used to
|
||||
|
|
|
@ -3,11 +3,29 @@
|
|||
#include "config.h"
|
||||
#include <ccan/autodata/autodata.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
/* For testing, we want to catch fatal messages. */
|
||||
#ifndef db_fatal
|
||||
#define db_fatal fatal
|
||||
#endif
|
||||
|
||||
struct db {
|
||||
char *filename;
|
||||
const char *in_transaction;
|
||||
sqlite3 *sql;
|
||||
|
||||
/* DB-specific context */
|
||||
void *conn;
|
||||
|
||||
/* The configuration, including translated queries for the current
|
||||
* instance. */
|
||||
const struct db_config *config;
|
||||
|
||||
const char **changes;
|
||||
|
||||
char *error;
|
||||
};
|
||||
|
||||
struct db_query {
|
||||
const char *name;
|
||||
|
|
Loading…
Add table
Reference in a new issue