channeld: don't commit until we've seen recent incoming msg, ping if required.

Now sending a ping makes sense: it should force the other end to send
a reply, unblocking the commitment process.

Note that rather than waiting for a reply, we're actually spinning on
a 100ms loop in this case.  But it's simple and it works.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-08-09 12:23:18 +09:30
committed by Christian Decker
parent 93e445daf5
commit 63e4ea17af
3 changed files with 28 additions and 1 deletions

View File

@@ -778,7 +778,6 @@ def test_reserve_enforcement(node_factory, executor):
)
@pytest.mark.xfail(strict=True)
@unittest.skipIf(not DEVELOPER, "needs dev_disconnect")
def test_htlc_send_timeout(node_factory, bitcoind):
"""Test that we don't commit an HTLC to an unreachable node."""