mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 09:04:22 +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:
@@ -1,9 +1,6 @@
|
||||
#include "config.h"
|
||||
#include <lightningd/log.h>
|
||||
|
||||
static void db_test_fatal(const char *fmt, ...);
|
||||
#define db_fatal db_test_fatal
|
||||
|
||||
static void db_log_(struct log *log UNUSED, enum log_level level UNUSED, const struct node_id *node_id UNUSED, bool call_notifier UNUSED, const char *fmt UNUSED, ...)
|
||||
{
|
||||
}
|
||||
@@ -59,7 +56,7 @@ bool wire_sync_write(int fd UNNEEDED, const void *msg TAKES UNNEEDED)
|
||||
/* AUTOGENERATED MOCKS END */
|
||||
|
||||
static char *db_err;
|
||||
static void db_test_fatal(const char *fmt, ...)
|
||||
void db_fatal(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user