| 382 | } |
| 383 | |
| 384 | void invoices_create_fallback(struct invoices *invoices, |
| 385 | u64 inv_dbid, |
| 386 | const u8 *scriptPubkey) |
| 387 | { |
| 388 | struct db_stmt *stmt; |
| 389 | |
| 390 | /* Save to database. */ |
| 391 | stmt = db_prepare_v2( |
| 392 | invoices->wallet->db, |
| 393 | SQL("INSERT INTO invoice_fallbacks" |
| 394 | " ( invoice_id, scriptpubkey )" |
| 395 | " VALUES ( ?, ?);")); |
| 396 | |
| 397 | db_bind_u64(stmt, inv_dbid); |
| 398 | db_bind_blob(stmt, scriptPubkey, |
| 399 | tal_bytelen(scriptPubkey)); |
| 400 | db_exec_prepared_v2(stmt); |
| 401 | tal_free(stmt); |
| 402 | } |
| 403 | |
| 404 | bool invoices_find_by_fallback_script(struct invoices *invoices, |
| 405 | u64 *inv_dbid, |
nothing calls this directly
no test coverage detected