mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
wallet: Add bip32_base to the wallet struct
Wallet should really be the container for anything bip32 related, so I'd like to slowly wean off of `ld->bip32_base` in favor of `ld->wallet->bip32_base`
This commit is contained in:
parent
8cdab9da1e
commit
d6656358b5
@ -26,6 +26,7 @@ static bool hsm_init_done(struct subd *hsm, const u8 *msg, const int *fds,
|
||||
ld->bip32_base) != WALLY_OK)
|
||||
errx(1, "HSM did not give unserializable BIP32 extkey");
|
||||
|
||||
ld->wallet->bip32_base = ld->bip32_base;
|
||||
io_break(ld->hsm);
|
||||
return true;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ struct wallet *wallet_new(const tal_t *ctx, struct log *log)
|
||||
struct wallet *wallet = tal(ctx, struct wallet);
|
||||
wallet->db = db_setup(wallet);
|
||||
wallet->log = log;
|
||||
wallet->bip32_base = NULL;
|
||||
if (!wallet->db) {
|
||||
fatal("Unable to setup the wallet database");
|
||||
}
|
||||
|
@ -5,10 +5,12 @@
|
||||
#include "db.h"
|
||||
#include <ccan/tal/tal.h>
|
||||
#include <lightningd/utxo.h>
|
||||
#include <wally_bip32.h>
|
||||
|
||||
struct wallet {
|
||||
struct db *db;
|
||||
struct log *log;
|
||||
struct ext_key *bip32_base;
|
||||
};
|
||||
|
||||
/* Possible states for tracked outputs in the database. Not sure yet
|
||||
|
Loading…
Reference in New Issue
Block a user