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

Function stmt2rebalance

plugins/bkpr/recorder.c:126–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126static struct rebalance *stmt2rebalance(const tal_t *ctx, struct db_stmt *stmt)
127{
128 struct rebalance *r = tal(ctx, struct rebalance);
129
130 r->in_ev_id = db_col_u64(stmt, "in_e.id");
131 r->out_ev_id = db_col_u64(stmt, "out_e.id");
132 r->in_acct_name = db_col_strdup(r, stmt, "in_acct.name");
133 r->out_acct_name = db_col_strdup(r, stmt, "out_acct.name");
134 db_col_amount_msat(stmt, "in_e.credit", &r->rebal_msat);
135 db_col_amount_msat(stmt, "out_e.fees", &r->fee_msat);
136
137 return r;
138}
139
140struct chain_event **list_chain_events_timebox(const tal_t *ctx,
141 struct db *db,

Callers 1

list_rebalancesFunction · 0.85

Calls 3

db_col_u64Function · 0.85
db_col_strdupFunction · 0.85
db_col_amount_msatFunction · 0.85

Tested by

no test coverage detected