fix calculate peer_hash