mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
daemon: config file support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -3,10 +3,32 @@
|
||||
#include "config.h"
|
||||
#include "bitcoin/pubkey.h"
|
||||
#include <ccan/list/list.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/timer/timer.h>
|
||||
#include <secp256k1.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Various adjustable things. */
|
||||
struct config {
|
||||
/* How long do we want them to lock up their funds? (seconds) */
|
||||
u32 rel_locktime;
|
||||
|
||||
/* How long do we let them lock up our funds? (seconds) */
|
||||
u32 rel_locktime_max;
|
||||
|
||||
/* How many confirms until we consider an anchor "settled". */
|
||||
u32 anchor_confirms;
|
||||
|
||||
/* How long will we accept them waiting? */
|
||||
u32 anchor_confirms_max;
|
||||
|
||||
/* What are we prepared to pay in commitment fee (satoshis). */
|
||||
u64 commitment_fee;
|
||||
|
||||
/* How little are we prepared to have them pay? */
|
||||
u64 commitment_fee_min;
|
||||
};
|
||||
|
||||
/* Here's where the global variables hide! */
|
||||
struct lightningd_state {
|
||||
/* Where all our logging goes. */
|
||||
@@ -18,6 +40,9 @@ struct lightningd_state {
|
||||
char *config_dir;
|
||||
char *rpc_filename;
|
||||
|
||||
/* Configuration settings. */
|
||||
struct config config;
|
||||
|
||||
/* Any pending timers. */
|
||||
struct timers timers;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user