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

Function htlc_state_owner

common/htlc.h:48–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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