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

Function wallet_datastore_next

wallet/wallet.c:5225–5247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5223}
5224
5225struct db_stmt *wallet_datastore_next(const tal_t *ctx,
5226 struct wallet *w,
5227 struct db_stmt *stmt,
5228 const char ***key,
5229 const u8 **data,
5230 u64 *generation)
5231{
5232 if (!db_step(stmt))
5233 return tal_free(stmt);
5234
5235 *key = db_col_datastore_key(ctx, stmt, "key");
5236 if (data)
5237 *data = db_col_arr(ctx, stmt, "data", u8);
5238 else
5239 db_col_ignore(stmt, "data");
5240
5241 if (generation)
5242 *generation = db_col_u64(stmt, "generation");
5243 else
5244 db_col_ignore(stmt, "generation");
5245
5246 return stmt;
5247}
5248
5249/* We use a different query form if we only care about a single channel. */
5250struct wallet_htlc_iter {

Callers 2

wallet_datastore_firstFunction · 0.85
json_listdatastoreFunction · 0.85

Calls 5

db_stepFunction · 0.85
tal_freeFunction · 0.85
db_col_datastore_keyFunction · 0.85
db_col_ignoreFunction · 0.85
db_col_u64Function · 0.85

Tested by

no test coverage detected