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

Function db_bind_node_id_arr

db/bindings.c:164–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void db_bind_node_id_arr(struct db_stmt *stmt,
165 const struct node_id *ids)
166{
167 /* Copy into contiguous array: ARM will add padding to struct node_id! */
168 size_t n = tal_count(ids);
169 u8 *arr = tal_arr(stmt, u8, n * sizeof(ids[0].k));
170
171 for (size_t i = 0; i < n; ++i) {
172 assert(node_id_valid(&ids[i]));
173 memcpy(arr + sizeof(ids[i].k) * i,
174 ids[i].k,
175 sizeof(ids[i].k));
176 }
177 db_bind_blob(stmt, arr, tal_count(arr));
178}
179
180void db_bind_pubkey(struct db_stmt *stmt, const struct pubkey *pk)
181{

Callers 1

wallet_add_paymentFunction · 0.85

Calls 2

node_id_validFunction · 0.85
db_bind_blobFunction · 0.85

Tested by

no test coverage detected