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

Function find_acct_id

plugins/bkpr/recorder.c:1442–1461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1440}
1441
1442static u64 find_acct_id(struct db *db, const char *name)
1443{
1444 u64 acct_id;
1445 struct db_stmt *stmt;
1446
1447 stmt = db_prepare_v2(db, SQL("SELECT"
1448 " id"
1449 " FROM accounts"
1450 " WHERE name = ?"));
1451
1452 db_bind_text(stmt, 0, name);
1453 db_query_prepared(stmt);
1454 if (db_step(stmt))
1455 acct_id = db_col_u64(stmt, "id");
1456 else
1457 acct_id = 0;
1458
1459 tal_free(stmt);
1460 return acct_id;
1461}
1462
1463static void insert_chain_fees_diff(struct db *db,
1464 u64 acct_id,

Callers 1

Calls 5

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

Tested by

no test coverage detected