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:541–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541void db_col_amount_msat_or_default(struct db_stmt *stmt,
542 const char *colname,
543 struct amount_msat *msat,
544 struct amount_msat def)
545{
546 size_t col = db_query_colnum(stmt, colname);
547
548 if (db_column_is_null(stmt, col))
549 *msat = def;
550 else
551 msat->millisatoshis = db_col_u64(stmt, colname); /* Raw: low level function */
552}
553
554struct amount_msat db_col_amount_msat(struct db_stmt *stmt, const char *colname)
555{

Callers 1

wallet_stmt2channelFunction · 0.85

Calls 3

db_query_colnumFunction · 0.85
db_column_is_nullFunction · 0.85
db_col_u64Function · 0.85

Tested by

no test coverage detected