fixed test function for p2pnetwork a bit