core-lightning/common/subdaemon.h
Rusty Russell 837e6232c3 common: reduce header differences for DEVELOPER vs non-DEVELOPER.
`make update-mocks` is usually run in DEVELOPER mode, but then it includes
definitions for functions which aren't declared in non-DEVELOPER mode.

We hacked this in a few places, but it's fragile, and worst, now we
have EXPERIMENTAL_FEATURES as well, it's complex.

Instead, declare developer-only functions (but don't define them).
This is a bit more awkward if you accidentally use one in
non-DEVELOPER code (link error rather than compile error), but makes
autogenerating test mocks much easier.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-09-06 14:35:01 +02:00

14 lines
342 B
C

#ifndef LIGHTNING_COMMON_SUBDAEMON_H
#define LIGHTNING_COMMON_SUBDAEMON_H
#include "config.h"
#include <common/daemon.h>
struct htable;
/* daemon_setup, but for subdaemons */
void subdaemon_setup(int argc, char *argv[]);
/* Only defined if DEVELOPER */
bool dump_memleak(struct htable *memtable);
#endif /* LIGHTNING_COMMON_SUBDAEMON_H */