| 122 | } |
| 123 | |
| 124 | void db_bind_secret_arr(struct db_stmt *stmt, const struct secret *s) |
| 125 | { |
| 126 | size_t num = tal_count(s), elsize = sizeof(s->data); |
| 127 | u8 *ser = tal_arr(stmt, u8, num * elsize); |
| 128 | |
| 129 | for (size_t i = 0; i < num; ++i) |
| 130 | memcpy(ser + i * elsize, &s[i], elsize); |
| 131 | |
| 132 | db_bind_blob(stmt, ser, tal_count(ser)); |
| 133 | } |
| 134 | |
| 135 | void db_bind_txid(struct db_stmt *stmt, const struct bitcoin_txid *t) |
| 136 | { |
no test coverage detected