connectd: don't log every time a peer disconnects.

Great for a few of our tests, but generally spammy.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-09-28 12:54:14 +09:30
parent 89bac0d516
commit 3358437062
3 changed files with 8 additions and 9 deletions

View File

@ -1111,9 +1111,6 @@ static struct io_plan *peer_disconnected(struct io_conn *conn,
io_wake(key);
tal_free(key);
status_trace("Forgetting peer %s",
type_to_string(tmpctx, struct pubkey, &id));
return daemon_conn_read_next(conn, &daemon->master);
}

View File

@ -125,8 +125,8 @@ def test_closing_id(node_factory):
l1.fund_channel(l2, 10**6)
cid = l2.rpc.listpeers()['peers'][0]['channels'][0]['channel_id']
l2.rpc.close(cid)
l1.daemon.wait_for_log("Forgetting peer .*")
l2.daemon.wait_for_log("Forgetting peer .*")
wait_for(lambda: not only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'])
wait_for(lambda: not only_one(l2.rpc.listpeers(l1.info['id'])['peers'])['connected'])
# Close by peer ID.
l2.rpc.connect(l1.info['id'], 'localhost', l1.port)
@ -134,8 +134,8 @@ def test_closing_id(node_factory):
l2.fund_channel(l1, 10**6)
pid = l1.info['id']
l2.rpc.close(pid)
l1.daemon.wait_for_log("Forgetting peer .*")
l2.daemon.wait_for_log("Forgetting peer .*")
wait_for(lambda: not only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'])
wait_for(lambda: not only_one(l2.rpc.listpeers(l1.info['id'])['peers'])['connected'])
@unittest.skipIf(not DEVELOPER, "needs dev-rescan-outputs")

View File

@ -305,7 +305,7 @@ def test_reconnect_gossiping(node_factory):
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l2.rpc.ping(l1.info['id'], 1, 65532)
l1.daemon.wait_for_log('Forgetting peer')
wait_for(lambda: l1.rpc.listpeers(l2.info['id'])['peers'] == [])
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l2.daemon.wait_for_log('processing now old peer gone')
@ -1023,7 +1023,9 @@ def test_peerinfo(node_factory, bitcoind):
with pytest.raises(RpcError, match=r'Channel close negotiation not finished'):
l1.rpc.close(chan, False, 0)
l1.daemon.wait_for_log('Forgetting peer')
wait_for(lambda: not only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'])
wait_for(lambda: not only_one(l2.rpc.listpeers(l1.info['id'])['peers'])['connected'])
bitcoind.generate_block(100)
l1.daemon.wait_for_log('WIRE_ONCHAIN_ALL_IRREVOCABLY_RESOLVED')
l2.daemon.wait_for_log('WIRE_ONCHAIN_ALL_IRREVOCABLY_RESOLVED')