mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
wallet: add ld pointer.
This will be required to give it direct access to the ld->peers list. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
fcffbd0f20
commit
15eaf56d79
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user