def setUp(self): self.mix_service = MixService(in_test=True) self.mix_service.db.delete_database() run_bootstrapper(self.mix_service.coin_interface, self.mix_service.db, self.mix_service.output_monitor)
def setUp(self): self.db = DatabaseHandler(test_db=True) self.db.delete_database() self.output_monitor = OutputMonitor(self.db) coin_interface = CryptocoinAPIHandler(MockCryptocoinAPI()) run_bootstrapper(coin_interface, self.db, self.output_monitor)
def setUp(self): self.db = DatabaseHandler(test_db=True) self.db.delete_database() self.coin_interface = CryptocoinAPIHandler(MockCryptocoinAPI()) self.output_monitor = OutputMonitor(self.db) self.transaction_engine = TransactionEngine(self.db, self.coin_interface, self.output_monitor) self.tumbler = Tumbler(self.db, self.transaction_engine, self.coin_interface) self.input_monitor = InputMonitor(self.db, self.coin_interface, self.tumbler) run_bootstrapper(self.coin_interface, self.db, self.output_monitor)
def __engage_transaction_engine(self): epoch_length = HyperParameters.TRANSACTION_ENGINE_EPOCH_LENGTH threading.Timer(epoch_length, self.__engage_transaction_engine).start() self.mix_service.transaction_engine.execute_pending_transactions() def __engage_input_monitor(self): epoch_length = HyperParameters.INPUT_MONITOR_EPOCH_LENGTH threading.Timer(epoch_length, self.__engage_input_monitor).start() self.mix_service.input_monitor.check_inputs() if __name__ == "__main__": in_test = False mix_service = MixService(in_test) if in_test: mix_service.db.delete_database() run_bootstrapper(mix_service.coin_interface, mix_service.db, mix_service.output_monitor) operators = Operators(mix_service) operators.run() web_service = WebService(mix_service) web_service.run()