def RelayDirectly(self, inventory):
        """
        Relay the inventory to the remote client.

        Args:
            inventory (neo.Network.Inventory):

        Returns:
            bool: True if relayed successfully. False otherwise.
        """
        relayed = False

        self.RelayCache[inventory.Hash.ToBytes()] = inventory

        for peer in self.Peers:
            relayed |= peer.Relay(inventory)

        if len(self.Peers) == 0:
            if type(BC.Default()) is TestLevelDBBlockchain:
                # mock a true result for tests
                return True

            logger.info("no connected peers")

        return relayed
def RelayDirectly ( self , inventory ) : relayed = False self . RelayCache [ inventory . Hash . ToBytes ( ) ] = inventory for peer in self . Peers : relayed |= peer . Relay ( inventory ) if len ( self . Peers ) == 0 : if type ( BC . Default ( ) ) is TestLevelDBBlockchain : return True logger . info ( "no connected peers" ) return relayed
Relay the inventory to the remote client.

        Args:
            inventory (neo.Network.Inventory):

        Returns:
            bool: True if relayed successfully. False otherwise.