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

Function blockheight_changes_done

common/blockheight_states.c:63–74  ·  view source on GitHub ↗

Are blockheights all agreed by both sides? */

Source from the content-addressed store, hash-verified

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

Callers 2

send_commitFunction · 0.85
pending_updatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected