finish peer_init and other peer prototypes