FIXME: slow */
| 244 | |
| 245 | /* FIXME: slow */ |
| 246 | struct onchain_fee **list_chain_fees_timebox(const tal_t *ctx, |
| 247 | const struct bkpr *bkpr, |
| 248 | u64 start_time, u64 end_time) |
| 249 | { |
| 250 | struct onchain_fee **ret = tal_arr(ctx, struct onchain_fee *, 0); |
| 251 | struct ofees_hash_iter it; |
| 252 | struct ordered_ofees *ofees; |
| 253 | |
| 254 | for (ofees = ofees_hash_first(bkpr->onchain_fees->by_account, &it); |
| 255 | ofees; |
| 256 | ofees = ofees_hash_next(bkpr->onchain_fees->by_account, &it)) { |
| 257 | for (size_t i = 0; i < tal_count(ofees->ofs); i++) { |
| 258 | if (ofees->ofs[i]->timestamp <= start_time) |
| 259 | continue; |
| 260 | if (ofees->ofs[i]->timestamp > end_time) |
| 261 | continue; |
| 262 | tal_arr_expand(&ret, ofees->ofs[i]); |
| 263 | } |
| 264 | } |
| 265 | order_fees(ret); |
| 266 | return ret; |
| 267 | } |
| 268 | |
| 269 | struct onchain_fee **list_chain_fees(const tal_t *ctx, const struct bkpr *bkpr) |
| 270 | { |
no test coverage detected