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

Function channel_state_opening

lightningd/peer_control.c:2064–2085  ·  view source on GitHub ↗

Is this a dual-funded open which has not reached the funding transaction * yet? All of these still own a dualopend, and none of them have a funding * tx we could rely on to bound the peer's efforts. */

Source from the content-addressed store, hash-verified

2062 * yet? All of these still own a dualopend, and none of them have a funding
2063 * tx we could rely on to bound the peer's efforts. */
2064static bool channel_state_opening(enum channel_state state)
2065{
2066 switch (state) {
2067 case DUALOPEND_OPEN_INIT:
2068 case DUALOPEND_OPEN_COMMIT_READY:
2069 case DUALOPEND_OPEN_COMMITTED:
2070 return true;
2071 case CHANNELD_AWAITING_LOCKIN:
2072 case DUALOPEND_AWAITING_LOCKIN:
2073 case CHANNELD_NORMAL:
2074 case CHANNELD_AWAITING_SPLICE:
2075 case CLOSINGD_SIGEXCHANGE:
2076 case CHANNELD_SHUTTING_DOWN:
2077 case CLOSINGD_COMPLETE:
2078 case AWAITING_UNILATERAL:
2079 case FUNDING_SPEND_SEEN:
2080 case ONCHAIN:
2081 case CLOSED:
2082 return false;
2083 }
2084 abort();
2085}
2086
2087/* Count in-flight channel opens for this peer: the single-funded opening
2088 * channel (if any) plus every dual-funded open which has not yet got a

Callers 1

num_inflight_opensFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected