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>
This commit is contained in:
Rusty Russell 2018-08-10 15:49:29 +09:30 committed by Christian Decker
parent f8aed1b4b0
commit 35d7449259
2 changed files with 3 additions and 3 deletions

View File

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

View File

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