| 124 | } |
| 125 | |
| 126 | static 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 | |
| 140 | struct chain_event **list_chain_events_timebox(const tal_t *ctx, |
| 141 | struct db *db, |
no test coverage detected