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

Function set_max_channel_dbid

wallet/wallet.c:1530–1542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1528}
1529
1530static void set_max_channel_dbid(struct wallet *w)
1531{
1532 struct db_stmt *stmt;
1533
1534 stmt = db_prepare_v2(w->db, SQL("SELECT id FROM channels ORDER BY id DESC LIMIT 1;"));
1535 db_query_prepared(stmt);
1536 w->max_channel_dbid = 0;
1537
1538 if (db_step(stmt))
1539 w->max_channel_dbid = db_col_u64(stmt, "id");
1540
1541 tal_free(stmt);
1542}
1543
1544static bool wallet_channels_load_active(struct wallet *w)
1545{

Callers 1

wallet_init_channelsFunction · 0.85

Calls 4

db_query_preparedFunction · 0.85
db_stepFunction · 0.85
db_col_u64Function · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected