diff --git a/lightningd/test/run-find_my_path.c b/lightningd/test/run-find_my_path.c index e795b64c4..b0763d923 100644 --- a/lightningd/test/run-find_my_path.c +++ b/lightningd/test/run-find_my_path.c @@ -112,7 +112,7 @@ bool wallet_htlcs_reconnect(struct wallet *wallet UNNEEDED, bool wallet_invoice_load(struct wallet *wallet UNNEEDED) { fprintf(stderr, "wallet_invoice_load called!\n"); abort(); } /* Generated stub for wallet_new */ -struct wallet *wallet_new(const tal_t *ctx UNNEEDED, +struct wallet *wallet_new(struct lightningd *ld UNNEEDED, struct log *log UNNEEDED, struct timers *timers UNNEEDED) { fprintf(stderr, "wallet_new called!\n"); abort(); } /* AUTOGENERATED MOCKS END */ diff --git a/wallet/wallet.c b/wallet/wallet.c index 07ea35df3..e942c944c 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -16,10 +16,11 @@ #define DIRECTION_INCOMING 0 #define DIRECTION_OUTGOING 1 -struct wallet *wallet_new(const tal_t *ctx, +struct wallet *wallet_new(struct lightningd *ld, struct log *log, struct timers *timers) { - struct wallet *wallet = tal(ctx, struct wallet); + struct wallet *wallet = tal(ld, struct wallet); + wallet->ld = ld; wallet->db = db_setup(wallet, log); wallet->log = log; wallet->bip32_base = NULL; diff --git a/wallet/wallet.h b/wallet/wallet.h index afb8f3c9b..334d948db 100644 --- a/wallet/wallet.h +++ b/wallet/wallet.h @@ -21,6 +21,7 @@ struct pubkey; struct timers; struct wallet { + struct lightningd *ld; struct db *db; struct log *log; struct ext_key *bip32_base; @@ -111,7 +112,7 @@ struct wallet_payment { * This is guaranteed to either return a valid wallet, or abort with * `fatal` if it cannot be initialized. */ -struct wallet *wallet_new(const tal_t *ctx, +struct wallet *wallet_new(struct lightningd *ld, struct log *log, struct timers *timers); /**