| 158 | } |
| 159 | |
| 160 | static void our_addresses_init(struct wallet *w) |
| 161 | { |
| 162 | w->our_addresses_maxindex = 0; |
| 163 | w->our_addresses = new_htable(w, wallet_address_htable); |
| 164 | |
| 165 | /* Prefill the address table up to keyscan_gap so rescans immediately |
| 166 | * include scripts without needing prior address allocations. */ |
| 167 | for (u32 i = 0; i <= w->keyscan_gap; i++) { |
| 168 | our_addresses_add_for_index(w, i); |
| 169 | } |
| 170 | w->our_addresses_maxindex = w->keyscan_gap; |
| 171 | } |
| 172 | |
| 173 | /* Idempotent: outpointfilter_add is a noop if it already exists. */ |
| 174 | static void refill_outpointfilters(struct wallet *w) |
no test coverage detected