diff --git a/wallet/db.c b/wallet/db.c index 08671b78c..180a8d174 100644 --- a/wallet/db.c +++ b/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 diff --git a/wallet/db_common.h b/wallet/db_common.h index 8156d6a1f..15d428fcb 100644 --- a/wallet/db_common.h +++ b/wallet/db_common.h @@ -3,11 +3,29 @@ #include "config.h" #include #include +#include + /* 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;