def request_collector(ms_address, ms_database, get_private_key): with patch("request_collector.server.MatrixListener"): rc = RequestCollector(private_key=get_private_key(ms_address), state_db=ms_database) rc.start() yield rc rc.stop() rc.join()
def request_collector( server_private_key, ms_database, web3, monitoring_service_contract, token_network_registry_contract, send_funds, contracts_manager: ContractManager, ): with patch('request_collector.server.MatrixListener'): rc = RequestCollector(private_key=server_private_key, state_db=ms_database) rc.start() yield rc rc.stop() rc.join()