Browse Source

connectd: initialize peer->conn.

It's only used in one place, but that's enough.

Fixes: #1434
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
35d7449259
  1. 5
      connectd/connect.c
  2. 1
      tests/test_connection.py

5
connectd/connect.c

@ -242,14 +242,15 @@ static bool broken_resolver(struct daemon *daemon)
return daemon->broken_resolver_response != NULL;
}
static struct peer *new_peer(const tal_t *ctx,
static struct peer *new_peer(struct io_conn *conn,
struct daemon *daemon,
const struct pubkey *their_id,
const struct wireaddr_internal *addr,
const struct crypto_state *cs)
{
struct peer *peer = tal(ctx, struct peer);
struct peer *peer = tal(conn, struct peer);
peer->conn = conn;
peer->id = *their_id;
peer->addr = *addr;
peer->daemon = daemon;

1
tests/test_connection.py

@ -311,7 +311,6 @@ def test_reconnect_gossiping(node_factory):
l2.daemon.wait_for_log('processing now old peer gone')
@pytest.mark.xfail(strict=False)
def test_connect_stresstest(node_factory, executor):
# This test is unreliable, but it's better than nothing.
l1 = node_factory.get_node(may_reconnect=True)

Loading…
Cancel
Save