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

Function dump_htlc

channeld/full_channel.c:135–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135static void dump_htlc(const struct htlc *htlc, const char *prefix)
136{
137 enum htlc_state remote_state;
138
139 if (htlc->state <= RCVD_REMOVE_ACK_REVOCATION)
140 remote_state = htlc->state + 10;
141 else
142 remote_state = htlc->state - 10;
143
144 status_debug("%s: HTLC %s %"PRIu64" = %s/%s %s",
145 prefix,
146 htlc_owner(htlc) == LOCAL ? "LOCAL" : "REMOTE",
147 htlc->id,
148 htlc_state_name(htlc->state),
149 htlc_state_name(remote_state),
150 htlc->r ? "FULFILLED" : htlc->failed ? "FAILED"
151 : "");
152}
153
154void dump_htlcs(const struct channel *channel, const char *prefix)
155{

Callers 6

dump_htlcsFunction · 0.85
gather_htlcsFunction · 0.85
add_htlcFunction · 0.85
channel_fulfill_htlcFunction · 0.85
channel_fail_htlcFunction · 0.85
change_htlcsFunction · 0.85

Calls 2

htlc_ownerFunction · 0.85
htlc_state_nameFunction · 0.50

Tested by

no test coverage detected