| 6893 | } |
| 6894 | |
| 6895 | void 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 | |
| 6908 | void db_bind_mvt_account_id(struct db_stmt *stmt, |
| 6909 | struct db *db, |
no test coverage detected