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

Function db_bind_credit_debit

wallet/wallet.c:6895–6906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6893}
6894
6895void db_bind_credit_debit(struct db_stmt *stmt,
6896 struct amount_msat credit,
6897 struct amount_msat debit)
6898{
6899 if (amount_msat_is_zero(debit))
6900 db_bind_amount_msat(stmt, credit);
6901 else {
6902 s64 debit_msats = debit.millisatoshis; /* Raw: negating */
6903 assert(amount_msat_is_zero(credit));
6904 db_bind_s64(stmt, -debit_msats);
6905 }
6906}
6907
6908void db_bind_mvt_account_id(struct db_stmt *stmt,
6909 struct db *db,

Callers 3

migrate_from_account_dbFunction · 0.85
insert_channel_mvtFunction · 0.85
insert_chain_mvtFunction · 0.85

Calls 3

amount_msat_is_zeroFunction · 0.85
db_bind_amount_msatFunction · 0.85
db_bind_s64Function · 0.85

Tested by

no test coverage detected