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

Function test_graceful_idle_peer

tests/test_misc.py:4394–4411  ·  view source on GitHub ↗

graceful with an idle peer disconnects it and completes

(node_factory, executor)

Source from the content-addressed store, hash-verified

4392
4393
4394def test_graceful_idle_peer(node_factory, executor):
4395 """graceful with an idle peer disconnects it and completes"""
4396 l1, l2 = node_factory.line_graph(2)
4397
4398 notifications = []
4399
4400 def run_graceful():
4401 def capture(message, **kwargs):
4402 if message:
4403 notifications.append(message)
4404 with l1.rpc.notify(capture):
4405 return l1.rpc.graceful()
4406
4407 fut = executor.submit(run_graceful)
4408 result = fut.result(TIMEOUT)
4409
4410 assert result == {}
4411 assert any("peers still connected" in n for n in notifications)
4412
4413
4414def test_graceful_htlc(node_factory, executor):

Callers

nothing calls this directly

Calls 2

line_graphMethod · 0.80
anyClass · 0.50

Tested by

no test coverage detected