| 559 | } |
| 560 | |
| 561 | static struct bkpr *bkpr_setup(const tal_t *ctx) |
| 562 | { |
| 563 | struct bkpr *bkpr = tal(ctx, struct bkpr); |
| 564 | |
| 565 | if (bkpr_db) |
| 566 | assert(sqlite3_close(bkpr_db) == SQLITE_OK); |
| 567 | |
| 568 | bkpr_db = db_setup(NULL, tmp_dsn(ctx)); |
| 569 | bkpr->accounts = init_accounts(ctx, NULL); |
| 570 | bkpr->onchain_fees = init_onchain_fees(bkpr, NULL); |
| 571 | bkpr->rebalances = init_rebalances(bkpr, NULL); |
| 572 | |
| 573 | /* We need to see everything */ |
| 574 | bkpr->chainmoves_index = bkpr->channelmoves_index = UINT64_MAX; |
| 575 | return bkpr; |
| 576 | } |
| 577 | |
| 578 | static bool accountseq(struct account *a1, struct account *a2) |
| 579 | { |
no test coverage detected