def AddTransaction(self, tx):
        """
        Add a transaction to the memory pool.

        Args:
            tx (neo.Core.TX.Transaction): instance.

        Returns:
            bool: True if successfully added. False otherwise.
        """
        if BC.Default() is None:
            return False

        if tx.Hash.ToBytes() in self.MemPool.keys():
            return False

        if BC.Default().ContainsTransaction(tx.Hash):
            return False

        if not tx.Verify(self.MemPool.values()):
            logger.error("Verifying tx result... failed")
            return False

        self.MemPool[tx.Hash.ToBytes()] = tx

        return True
def AddTransaction ( self , tx ) : if BC . Default ( ) is None : return False if tx . Hash . ToBytes ( ) in self . MemPool . keys ( ) : return False if BC . Default ( ) . ContainsTransaction ( tx . Hash ) : return False if not tx . Verify ( self . MemPool . values ( ) ) : logger . error ( "Verifying tx result... failed" ) return False self . MemPool [ tx . Hash . ToBytes ( ) ] = tx return True
Add a transaction to the memory pool.

        Args:
            tx (neo.Core.TX.Transaction): instance.

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