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

Function forward_index_inc

lightningd/forwards.c:12–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <lightningd/lightningd.h>
11
12static u64 forward_index_inc(struct lightningd *ld,
13 enum forward_status status,
14 struct short_channel_id in_channel,
15 u64 in_htlc_id,
16 const struct amount_msat *in_amount,
17 const struct short_channel_id *out_channel,
18 enum wait_index idx)
19{
20 return wait_index_increment(ld, ld->wallet->db,
21 WAIT_SUBSYSTEM_FORWARD, idx,
22 "status", forward_status_name(status),
23 "in_channel", fmt_short_channel_id(tmpctx, in_channel),
24 "=in_htlc_id", tal_fmt(tmpctx, "%"PRIu64, in_htlc_id),
25 "=in_msat", in_amount ? tal_fmt(tmpctx, "%"PRIu64, in_amount->millisatoshis) : NULL, /* Raw: JSON output */
26 "out_channel", out_channel ? fmt_short_channel_id(tmpctx, *out_channel): NULL,
27 NULL);
28}
29
30void forward_index_deleted(struct lightningd *ld,
31 enum forward_status status,

Callers 3

forward_index_deletedFunction · 0.85
forward_index_createdFunction · 0.85

Calls 3

forward_status_nameFunction · 0.85
fmt_short_channel_idFunction · 0.85
wait_index_incrementFunction · 0.70

Tested by

no test coverage detected