Browse Source

connectd: make failure message more descriptive

travis-debug
lisa neigut 5 years ago
committed by neil saitug
parent
commit
f6ff5e5b19
  1. 2
      connectd/connectd.c
  2. 2
      tests/test_connection.py

2
connectd/connectd.c

@ -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;
} }

2
tests/test_connection.py

@ -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.

Loading…
Cancel
Save