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:
niftynei
2022-03-01 11:22:15 -06:00
committed by Rusty Russell
parent b0829fc52a
commit 03c950bae8
6 changed files with 54 additions and 37 deletions

View File

@@ -53,6 +53,7 @@ char *arg_log_to_file(const char *arg, struct lightningd *ld);
/* Once this is set, we dump fatal with a backtrace to this log */
extern struct log *crashlog;
void NORETURN PRINTF_FMT(1,2) fatal(const char *fmt, ...);
void NORETURN fatal_vfmt(const char *fmt, va_list ap);
void log_backtrace_print(const char *fmt, ...);
void log_backtrace_exit(void);