| 3075 | #endif /* COMPAT_V061 */ |
| 3076 | |
| 3077 | static u64 htlcs_index_inc(struct lightningd *ld, |
| 3078 | u64 htlc_id, |
| 3079 | const struct channel *channel, |
| 3080 | const struct sha256 *payment_hash, |
| 3081 | enum side owner, |
| 3082 | u32 expiry, |
| 3083 | struct amount_msat amount, |
| 3084 | enum htlc_state hstate, |
| 3085 | enum wait_index idx) |
| 3086 | { |
| 3087 | return wait_index_increment(ld, ld->wallet->db, |
| 3088 | WAIT_SUBSYSTEM_HTLCS, idx, |
| 3089 | "state", htlc_state_name(hstate), |
| 3090 | "short_channel_id", fmt_short_channel_id(tmpctx, channel_scid_or_local_alias(channel)), |
| 3091 | "direction", owner == LOCAL ? "out": "in", |
| 3092 | "=htlc_id", tal_fmt(tmpctx, "%"PRIu64, htlc_id), |
| 3093 | "=cltv_expiry", tal_fmt(tmpctx, "%"PRIu32, expiry), |
| 3094 | "payment_hash", fmt_sha256(tmpctx, payment_hash), |
| 3095 | "=amount_msat", tal_fmt(tmpctx, "%"PRIu64, amount.millisatoshis), /* Raw: JSON output */ |
| 3096 | NULL); |
| 3097 | } |
| 3098 | |
| 3099 | void htlcs_index_deleted(struct lightningd *ld, |
| 3100 | const struct channel *channel, |
no test coverage detected