connectd: make failure message more descriptive

This commit is contained in:
lisa neigut 2019-12-04 12:45:18 -06:00 committed by neil saitug
parent ff412a6c9a
commit f6ff5e5b19
2 changed files with 2 additions and 2 deletions

View File

@ -1428,7 +1428,7 @@ static void try_connect_peer(struct daemon *daemon,
* to retry; an address may get gossiped or appear on the DNS seed. */ * to retry; an address may get gossiped or appear on the DNS seed. */
if (tal_count(addrs) == 0) { if (tal_count(addrs) == 0) {
connect_failed(daemon, id, seconds_waited, addrhint, connect_failed(daemon, id, seconds_waited, addrhint,
"No address known"); "Unable to connect, no address known for peer");
return; return;
} }

View File

@ -38,7 +38,7 @@ def test_connect(node_factory):
assert len(l2.rpc.listpeers()) == 1 assert len(l2.rpc.listpeers()) == 1
# Should get reasonable error if unknown addr for peer. # Should get reasonable error if unknown addr for peer.
with pytest.raises(RpcError, match=r'No address known'): with pytest.raises(RpcError, match=r'Unable to connect, no address known'):
l1.rpc.connect('032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e') l1.rpc.connect('032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e')
# Should get reasonable error if connection refuse. # Should get reasonable error if connection refuse.