MCPcopy Create free account
hub / github.com/ElementsProject/lightning / bkpr_setup

Function bkpr_setup

plugins/bkpr/test/run-recorder.c:561–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561static 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
578static bool accountseq(struct account *a1, struct account *a2)
579{

Callers 8

test_channel_rebalancesFunction · 0.85
test_channel_event_crudFunction · 0.85
test_chain_event_crudFunction · 0.85
test_account_balancesFunction · 0.85
test_account_crudFunction · 0.85

Calls 5

tmp_dsnFunction · 0.85
db_setupFunction · 0.70
init_accountsFunction · 0.70
init_onchain_feesFunction · 0.70
init_rebalancesFunction · 0.70

Tested by

no test coverage detected