synchronization of PeerState via Lock