| 6856 | } |
| 6857 | |
| 6858 | void 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 | |
| 6871 | void db_bind_mvt_account_id(struct db_stmt *stmt, |
| 6872 | struct db *db, |
no test coverage detected