txgossip/recipies.py
def _check_consensus(self, key):
        """Check if all peers have the same value for C{key}.

        Return the value if they all have the same value, otherwise
        return C{None}.
        """
        correct = self._gossiper.get(key)
        for peer in self._gossiper.live_peers:
            if not key in peer.keys():
                return None
            value = peer.get(key)
            if value != correct:
                return None
        return correct
Check if all peers have the same value for C{key}.

        Return the value if they all have the same value, otherwise
        return C{None}.
        
Check if all peers have the same value for C{key}.
Return the value if they all have the same value, otherwise
return C{None}.
Check if all peers have the same value for C { key } . Return the value if they all have the same value otherwise return C { None } .
def _check_consensus(self, key):
        correct = self._gossiper.get(key)
        for peer in self._gossiper.live_peers:
            if not key in peer.keys():
                return None
            value = peer.get(key)
            if value != correct:
                return None
        return correct
def _check_consensus ( self , key ) : correct = self . _gossiper . get ( key ) for peer in self . _gossiper . live_peers : if not key in peer . keys ( ) : return None value = peer . get ( key ) if value != correct : return None return correct
Check if all peers have the same value for C{key}.
Check if all peers have the same value for C { key } .
"""Check if all peers have the same value for C{key}.

        Return the value if they all have the same value, otherwise
        return C{None}.
        """
self
key