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

Function db_col_amount_msat_or_default

db/bindings.c:460–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460void db_col_amount_msat_or_default(struct db_stmt *stmt,
461 const char *colname,
462 struct amount_msat *msat,
463 struct amount_msat def)
464{
465 size_t col = db_query_colnum(stmt, colname);
466
467 if (db_column_is_null(stmt, col))
468 *msat = def;
469 else
470 msat->millisatoshis = db_col_u64(stmt, colname); /* Raw: low level function */
471}
472
473void db_col_amount_msat(struct db_stmt *stmt, const char *colname,
474 struct amount_msat *msat)

Callers 1

Calls 3

db_query_colnumFunction · 0.85
db_column_is_nullFunction · 0.85
db_col_u64Function · 0.85

Tested by

no test coverage detected