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

Function _worker

tests/plugins/lsps2_service_mock.py:155–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153
154
155def _worker():
156 plugin.log("collecting htlcs and fund channel...")
157 with state.lock:
158 peer = state.target_peer
159 cap = state.channel_cap
160 fee = state.opening_fee_msat
161 if not peer or not cap or not fee:
162 with state.lock:
163 _release_all_locked()
164 return
165
166 ok = _ensure_zero_conf_channel(peer, cap)
167 with state.lock:
168 state.channel_ready = ok
169 state.fee_remaining_msat = fee if ok else 0
170 _release_all_locked()
171
172
173@plugin.method("setuplsps2service")

Callers

nothing calls this directly

Calls 3

_release_all_lockedFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected