mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
db: decouple fatal reliance, have as impl defined function
`fatal` is defined in lightningd and has logfile dependencies etc. Make it more generic by allowing declaration in the use file (wallet.c)
This commit is contained in:
@@ -45,6 +45,21 @@ struct channel_state_param {
|
||||
const enum channel_state_bucket state;
|
||||
};
|
||||
|
||||
/* Implement db_fatal, as a wrapper around fatal.
|
||||
* We use a ifndef block so that it can get be
|
||||
* implemented in a test file first, if necessary */
|
||||
#ifndef DB_FATAL
|
||||
#define DB_FATAL
|
||||
void db_fatal(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
fatal_vfmt(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif /* DB_FATAL */
|
||||
|
||||
static void outpointfilters_init(struct wallet *w)
|
||||
{
|
||||
struct db_stmt *stmt;
|
||||
|
||||
Reference in New Issue
Block a user