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

Function htlc_state_owner

common/htlc.h:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49int htlc_state_flags(enum htlc_state state);
50
51static inline enum side htlc_state_owner(enum htlc_state state)
52{
53 if (state < RCVD_ADD_HTLC) {
54 assert((htlc_state_flags(state)
55 & (HTLC_REMOTE_F_OWNER|HTLC_LOCAL_F_OWNER))
56 == HTLC_LOCAL_F_OWNER);
57 return LOCAL;
58 } else {
59 assert((htlc_state_flags(state)
60 & (HTLC_REMOTE_F_OWNER|HTLC_LOCAL_F_OWNER))
61 == HTLC_REMOTE_F_OWNER);
62 return REMOTE;
63 }
64}
65
66static inline const char *side_to_str(enum side side)
67{

Callers 9

collect_htlcsFunction · 0.85
resend_commitmentFunction · 0.85
add_htlcFunction · 0.85
adjust_balanceFunction · 0.85
channel_force_htlcsFunction · 0.85
htlc_ownerFunction · 0.85
changed_htlcFunction · 0.85
htlc_in_checkFunction · 0.85
htlc_out_checkFunction · 0.85

Calls 1

htlc_state_flagsFunction · 0.70

Tested by

no test coverage detected