| 90 | } |
| 91 | |
| 92 | struct wallet *wallet_new(struct lightningd *ld, struct timers *timers, |
| 93 | struct ext_key *bip32_base STEALS) |
| 94 | { |
| 95 | struct wallet *wallet = tal(ld, struct wallet); |
| 96 | wallet->ld = ld; |
| 97 | wallet->log = new_log(wallet, ld->log_book, NULL, "wallet"); |
| 98 | wallet->bip32_base = tal_steal(wallet, bip32_base); |
| 99 | wallet->keyscan_gap = 50; |
| 100 | list_head_init(&wallet->unstored_payments); |
| 101 | wallet->db = db_setup(wallet, ld, wallet->bip32_base); |
| 102 | |
| 103 | db_begin_transaction(wallet->db); |
| 104 | wallet->invoices = invoices_new(wallet, wallet->db, timers); |
| 105 | outpointfilters_init(wallet); |
| 106 | db_commit_transaction(wallet->db); |
| 107 | return wallet; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * wallet_add_utxo - Register an UTXO which we (partially) own |
nothing calls this directly
no test coverage detected