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

Function db_bind_node_id_arr

db/bindings.c:139–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void db_bind_node_id_arr(struct db_stmt *stmt, int col,
140 const struct node_id *ids)
141{
142 /* Copy into contiguous array: ARM will add padding to struct node_id! */
143 size_t n = tal_count(ids);
144 u8 *arr = tal_arr(stmt, u8, n * sizeof(ids[0].k));
145
146 for (size_t i = 0; i < n; ++i) {
147 assert(node_id_valid(&ids[i]));
148 memcpy(arr + sizeof(ids[i].k) * i,
149 ids[i].k,
150 sizeof(ids[i].k));
151 }
152 db_bind_blob(stmt, col, arr, tal_count(arr));
153}
154
155void db_bind_pubkey(struct db_stmt *stmt, int pos, const struct pubkey *pk)
156{

Callers 1

wallet_payment_storeFunction · 0.85

Calls 2

node_id_validFunction · 0.85
db_bind_blobFunction · 0.85

Tested by

no test coverage detected