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

Function htlc_in_update_state

lightningd/peer_htlcs.c:57–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static bool htlc_in_update_state(struct channel *channel,
58 struct htlc_in *hin,
59 enum htlc_state newstate)
60{
61 if (!state_update_ok(channel, hin->hstate, newstate, hin->key.id, "in"))
62 return false;
63
64 wallet_htlc_update(channel->peer->ld->wallet,
65 hin->dbid, newstate, hin->preimage,
66 max_unsigned(channel->next_index[LOCAL],
67 channel->next_index[REMOTE]),
68 hin->badonion, hin->failonion, NULL,
69 hin->we_filled);
70
71 hin->hstate = newstate;
72 return true;
73}
74
75static bool htlc_out_update_state(struct channel *channel,
76 struct htlc_out *hout,

Callers 5

fail_in_htlcFunction · 0.85
fulfill_htlcFunction · 0.85
peer_accepted_htlcFunction · 0.85
update_in_htlcFunction · 0.85

Calls 2

state_update_okFunction · 0.85
wallet_htlc_updateFunction · 0.85

Tested by

no test coverage detected