peer: don't assign io_data and id twice when connecting out.

peer_first_connected does this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-11-04 11:17:04 +10:30
parent 8a1559a343
commit ac7d80bbeb

View File

@ -2659,8 +2659,6 @@ static struct io_plan *crypto_on_out(struct io_conn *conn,
connect->name, connect->port); connect->name, connect->port);
return io_close(conn); return io_close(conn);
} }
peer->io_data = tal_steal(peer, iod);
peer->id = tal_dup(peer, struct pubkey, id);
peer->anchor.input = tal_steal(peer, connect->input); peer->anchor.input = tal_steal(peer, connect->input);
peer->open_jsoncmd = connect->cmd; peer->open_jsoncmd = connect->cmd;
return peer_crypto_on(conn, peer); return peer_crypto_on(conn, peer);