mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
pytest: fix flake in test_connection.py::test_opener_feerate_reconnect
Make sure it sees disconnect before reconnect, otherwise the next command fails since we're now disconnected. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
2a80400a0f
commit
bcf3cef96c
2 changed files with 2 additions and 0 deletions
|
@ -1408,6 +1408,7 @@ void peer_disconnect_done(struct lightningd *ld, const u8 *msg)
|
|||
/* If we still have peer, it's disconnected now */
|
||||
p = peer_by_id(ld, &id);
|
||||
if (p) {
|
||||
log_peer_debug(ld->log, &id, "peer_disconnect_done");
|
||||
p->is_connected = false;
|
||||
/* If we only cared about peer because of connectd, free it. */
|
||||
if (list_empty(&p->channels) && !p->uncommitted_channel) {
|
||||
|
|
|
@ -2748,6 +2748,7 @@ def test_opener_feerate_reconnect(node_factory, bitcoind):
|
|||
|
||||
# Wait until they reconnect.
|
||||
l1.daemon.wait_for_log('Peer transient failure in CHANNELD_NORMAL')
|
||||
l1.daemon.wait_for_log('peer_disconnect_done')
|
||||
wait_for(lambda: l1.rpc.getpeer(l2.info['id'])['connected'])
|
||||
|
||||
# Should work normally.
|
||||
|
|
Loading…
Add table
Reference in a new issue