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

Function blockheight_changes_done

common/blockheight_states.c:64–75  ·  view source on GitHub ↗

Are blockheights all agreed by both sides? */

Source from the content-addressed store, hash-verified

62
63/* Are blockheights all agreed by both sides? */
64bool blockheight_changes_done(const struct height_states *height_states,
65 bool ignore_uncommitted)
66{
67 size_t num_blockheights = 0;
68 for (size_t i = 0; i < ARRAY_SIZE(height_states->height); i++) {
69 if (ignore_uncommitted
70 && (i == RCVD_ADD_HTLC || i == SENT_ADD_HTLC))
71 continue;
72 num_blockheights += (height_states->height[i] != NULL);
73 }
74 return num_blockheights == 1;
75}
76
77bool inc_height_state(struct height_states *height_states,
78 enum htlc_state hstate)

Callers 2

send_commitFunction · 0.85
pending_updatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected