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

Function db_bind_credit_debit

wallet/wallet.c:6858–6869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6856}
6857
6858void db_bind_credit_debit(struct db_stmt *stmt,
6859 struct amount_msat credit,
6860 struct amount_msat debit)
6861{
6862 if (amount_msat_is_zero(debit))
6863 db_bind_amount_msat(stmt, credit);
6864 else {
6865 s64 debit_msats = debit.millisatoshis; /* Raw: negating */
6866 assert(amount_msat_is_zero(credit));
6867 db_bind_s64(stmt, -debit_msats);
6868 }
6869}
6870
6871void db_bind_mvt_account_id(struct db_stmt *stmt,
6872 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