pub(super) async fn create_batch_executor(
        &mut self,
        storage_type: StorageType,
    ) -> Box<dyn BatchExecutor<OwnedStorage>> {
        let (l1_batch_env, system_env, pubdata_params) = self.default_batch_params();
        match storage_type {
            StorageType::AsyncRocksdbCache => {
                let (state_keeper_storage, task) = AsyncRocksdbCache::new(
                    self.pool(),
                    self.state_keeper_db_path(),
                    RocksdbStorageOptions::default(),
                );
                let handle = tokio::task::spawn(async move {
                    let (_stop_sender, stop_receiver) = watch::channel(false);
                    task.run(stop_receiver).await.unwrap()
                });
                self.tasks.push(handle);
                self.create_batch_executor_inner(
                    Arc::new(state_keeper_storage),
                    l1_batch_env,
                    system_env,
                    pubdata_params,
                )
                .await
            }
            StorageType::Rocksdb => {
                self.create_batch_executor_inner(
                    Arc::new(RocksdbStorageFactory::new(
                        self.pool(),
                        self.state_keeper_db_path(),
                    )),
                    l1_batch_env,
                    system_env,
                    pubdata_params,
                )
                .await
            }
            StorageType::Postgres => {
                self.create_batch_executor_inner(
                    Arc::new(self.pool()),
                    l1_batch_env,
                    system_env,
                    pubdata_params,
                )
                .await
            }
        }
    }
Creates a batch executor instance with the specified storage type.
This function intentionally uses sensible defaults to not introduce boilerplate.
core/node/state_keeper/src/executor/tests/tester.rs