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

Function wallet_network_events_extract

wallet/wallet.c:7415–7432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7413}
7414
7415void wallet_network_events_extract(const tal_t *ctx,
7416 struct db_stmt *stmt,
7417 u64 *id,
7418 struct node_id *peer_id,
7419 u64 *timestamp,
7420 enum network_event *etype,
7421 const char **reason,
7422 u64 *duration_nsec,
7423 bool *connect_attempted)
7424{
7425 *id = db_col_u64(stmt, "id");
7426 db_col_node_id(stmt, "peer_id", peer_id);
7427 *etype = network_event_in_db(db_col_int(stmt, "type"));
7428 *timestamp = db_col_u64(stmt, "timestamp");
7429 *reason = db_col_strdup_optional(ctx, stmt, "reason");
7430 *duration_nsec = db_col_u64(stmt, "duration_nsec");
7431 *connect_attempted = db_col_int(stmt, "connect_attempted");
7432}
7433
7434static u64 network_event_index_inc(struct lightningd *ld,
7435 /* NULL means it's being created */

Callers 1

json_listnetworkeventsFunction · 0.85

Calls 5

db_col_u64Function · 0.85
db_col_node_idFunction · 0.85
network_event_in_dbFunction · 0.85
db_col_intFunction · 0.85
db_col_strdup_optionalFunction · 0.85

Tested by

no test coverage detected