splitting common functionality out of seeded peer discovery test