diff --git a/stats/stats/src/charts/lines/native_coin_holders_growth.rs b/stats/stats/src/charts/lines/native_coin_holders_growth.rs index d7fcd4667..41105e5b1 100644 --- a/stats/stats/src/charts/lines/native_coin_holders_growth.rs +++ b/stats/stats/src/charts/lines/native_coin_holders_growth.rs @@ -88,7 +88,7 @@ impl CreateBehaviour for Create { pub struct Update; -impl UpdateBehaviour<(), (), NaiveDate> for Update { +impl UpdateBehaviour<(), NaiveDate> for Update { async fn update_values( cx: &UpdateContext<'_>, chart_id: i32, @@ -383,7 +383,7 @@ define_and_impl_resolution_properties!( ); pub type NativeCoinHoldersGrowth = - LocalDbChartSource<(), (), Create, Update, DefaultQueryVec, Properties>; + LocalDbChartSource<(), Create, Update, DefaultQueryVec, Properties>; pub type NativeCoinHoldersGrowthInt = MapParseTo; pub type NativeCoinHoldersGrowthWeekly = DirectVecLocalDbChartSource< LastValueLowerResolution, diff --git a/stats/stats/src/data_source/kinds/auxiliary/cumulative.rs b/stats/stats/src/data_source/kinds/auxiliary/cumulative.rs index dc21d253d..8f405f04c 100644 --- a/stats/stats/src/data_source/kinds/auxiliary/cumulative.rs +++ b/stats/stats/src/data_source/kinds/auxiliary/cumulative.rs @@ -31,7 +31,6 @@ where Delta: DataSource>>, { type MainDependencies = Delta; - type ResolutionDependencies = (); type Output = Vec>; fn mutex_id() -> Option { None diff --git a/stats/stats/src/data_source/kinds/data_manipulation/delta.rs b/stats/stats/src/data_source/kinds/data_manipulation/delta.rs index 9b6edb65d..85a271e00 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/delta.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/delta.rs @@ -42,7 +42,6 @@ where ::Err: Display, { type MainDependencies = DS; - type ResolutionDependencies = (); type Output = Vec>; fn mutex_id() -> Option { None diff --git a/stats/stats/src/data_source/kinds/data_manipulation/filter_deducible.rs b/stats/stats/src/data_source/kinds/data_manipulation/filter_deducible.rs index 7b4b5786d..05fe946c0 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/filter_deducible.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/filter_deducible.rs @@ -29,7 +29,6 @@ where Properties: ChartProperties, { type MainDependencies = DS; - type ResolutionDependencies = (); type Output = DS::Output; fn mutex_id() -> Option { diff --git a/stats/stats/src/data_source/kinds/data_manipulation/last_point.rs b/stats/stats/src/data_source/kinds/data_manipulation/last_point.rs index ff98bfcf1..7dc31ffd3 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/last_point.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/last_point.rs @@ -28,7 +28,6 @@ where TimespanValue: ZeroTimespanValue, { type MainDependencies = DS; - type ResolutionDependencies = (); type Output = TimespanValue; fn mutex_id() -> Option { None diff --git a/stats/stats/src/data_source/kinds/data_manipulation/map/mod.rs b/stats/stats/src/data_source/kinds/data_manipulation/map/mod.rs index e48fffc0f..4249d6aa0 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/map/mod.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/map/mod.rs @@ -35,7 +35,6 @@ where F: MapFunction, { type MainDependencies = D; - type ResolutionDependencies = (); type Output = F::Output; fn mutex_id() -> Option { None diff --git a/stats/stats/src/data_source/kinds/data_manipulation/resolutions/average.rs b/stats/stats/src/data_source/kinds/data_manipulation/resolutions/average.rs index 7bc8dc642..d9bc7ba26 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/resolutions/average.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/resolutions/average.rs @@ -37,8 +37,7 @@ where LowerRes: Timespan + ConsistsOf + Eq + Debug + Send, HigherRes: Ord + Clone + Debug + Send, { - type MainDependencies = Average; - type ResolutionDependencies = Weight; + type MainDependencies = (Average, Weight); type Output = Vec>; fn mutex_id() -> Option { diff --git a/stats/stats/src/data_source/kinds/data_manipulation/resolutions/last_value.rs b/stats/stats/src/data_source/kinds/data_manipulation/resolutions/last_value.rs index 6af0b73a7..78a5d0efa 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/resolutions/last_value.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/resolutions/last_value.rs @@ -28,7 +28,6 @@ where DS: DataSource>>, { type MainDependencies = DS; - type ResolutionDependencies = (); type Output = Vec>; fn mutex_id() -> Option { diff --git a/stats/stats/src/data_source/kinds/data_manipulation/resolutions/sum.rs b/stats/stats/src/data_source/kinds/data_manipulation/resolutions/sum.rs index 399666510..0cbaf6770 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/resolutions/sum.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/resolutions/sum.rs @@ -33,7 +33,6 @@ where DS: DataSource>>, { type MainDependencies = DS; - type ResolutionDependencies = (); type Output = Vec>; fn mutex_id() -> Option { diff --git a/stats/stats/src/data_source/kinds/data_manipulation/sum_point.rs b/stats/stats/src/data_source/kinds/data_manipulation/sum_point.rs index 6cc68f018..ee1a7c1d6 100644 --- a/stats/stats/src/data_source/kinds/data_manipulation/sum_point.rs +++ b/stats/stats/src/data_source/kinds/data_manipulation/sum_point.rs @@ -37,7 +37,6 @@ where DS: DataSource>>, { type MainDependencies = DS; - type ResolutionDependencies = (); type Output = TimespanValue; fn mutex_id() -> Option { None diff --git a/stats/stats/src/data_source/kinds/local_db/mod.rs b/stats/stats/src/data_source/kinds/local_db/mod.rs index 35798f2c0..56b7acced 100644 --- a/stats/stats/src/data_source/kinds/local_db/mod.rs +++ b/stats/stats/src/data_source/kinds/local_db/mod.rs @@ -52,14 +52,13 @@ pub mod parameters; /// with common parameter combinations. /// /// See [module-level documentation](self) for more details. -pub struct LocalDbChartSource( - PhantomData<(MainDep, ResolutionDep, Create, Update, Query, ChartProps)>, +pub struct LocalDbChartSource( + PhantomData<(MainDep, Create, Update, Query, ChartProps)>, ) where MainDep: DataSource, - ResolutionDep: DataSource, Create: CreateBehaviour, - Update: UpdateBehaviour, + Update: UpdateBehaviour, Query: QueryBehaviour, ChartProps: ChartProperties; @@ -78,11 +77,9 @@ where /// The opposite logic to [`Delta`](`crate::data_source::kinds::data_manipulation::delta::Delta`) pub type DailyCumulativeLocalDbChartSource = LocalDbChartSource< PartialCumulative, - (), DefaultCreate, BatchUpdate< PartialCumulative, - (), AddLastValueStep, Batch30Days, DefaultQueryVec, @@ -96,31 +93,23 @@ pub type DailyCumulativeLocalDbChartSource = LocalDbChartSource< /// any manipulations) pub type DirectVecLocalDbChartSource = LocalDbChartSource< Dependency, - (), DefaultCreate, - BatchUpdate, C>, + BatchUpdate, C>, DefaultQueryVec, C, >; /// Chart that stores single data point received from provided dependency (without /// any manipulations) -pub type DirectPointLocalDbChartSource = LocalDbChartSource< - Dependency, - (), - DefaultCreate, - PassPoint, - DefaultQueryLast, - C, ->; +pub type DirectPointLocalDbChartSource = + LocalDbChartSource, PassPoint, DefaultQueryLast, C>; -impl - LocalDbChartSource +impl + LocalDbChartSource where MainDep: DataSource + Sync, - ResolutionDep: DataSource + Sync, Create: CreateBehaviour + Sync, - Update: UpdateBehaviour + Sync, + Update: UpdateBehaviour + Sync, Query: QueryBehaviour + Sync, ChartProps: ChartProperties, ChartProps::Resolution: Ord + Clone + Debug, @@ -195,19 +184,17 @@ fn postgres_timestamps_eq(time_1: DateTime, time_2: DateTime) -> bool time_1.trunc_subsecs(6).eq(&time_2.trunc_subsecs(6)) } -impl DataSource - for LocalDbChartSource +impl DataSource + for LocalDbChartSource where MainDep: DataSource + Sync, - ResolutionDep: DataSource + Sync, Create: CreateBehaviour + Sync, - Update: UpdateBehaviour + Sync, + Update: UpdateBehaviour + Sync, Query: QueryBehaviour + Sync, ChartProps: ChartProperties, ChartProps::Resolution: Ord + Clone + Debug + Send, { type MainDependencies = MainDep; - type ResolutionDependencies = ResolutionDep; type Output = Query::Output; fn mutex_id() -> Option { @@ -257,13 +244,12 @@ where // need to delegate these traits for update groups to use -impl Named - for LocalDbChartSource +impl Named + for LocalDbChartSource where MainDep: DataSource, - ResolutionDep: DataSource, Create: CreateBehaviour, - Update: UpdateBehaviour, + Update: UpdateBehaviour, Query: QueryBehaviour, ChartProps: ChartProperties + Named, { @@ -273,13 +259,12 @@ where } #[portrait::fill(portrait::delegate(ChartProps))] -impl ChartProperties - for LocalDbChartSource +impl ChartProperties + for LocalDbChartSource where MainDep: DataSource + Sync, - ResolutionDep: DataSource + Sync, Create: CreateBehaviour + Sync, - Update: UpdateBehaviour + Sync, + Update: UpdateBehaviour + Sync, Query: QueryBehaviour + Sync, ChartProps: ChartProperties, { @@ -343,10 +328,9 @@ mod tests { } } - impl UpdateBehaviour for UpdateSingleTriggerAsserter + impl UpdateBehaviour for UpdateSingleTriggerAsserter where M: DataSource, - R: DataSource, Resolution: Send, { async fn update_values( @@ -387,7 +371,6 @@ mod tests { } type TestedChart = LocalDbChartSource< - (), (), DefaultCreate, UpdateSingleTriggerAsserter, diff --git a/stats/stats/src/data_source/kinds/local_db/parameter_traits.rs b/stats/stats/src/data_source/kinds/local_db/parameter_traits.rs index 8de6b4aa2..2be7a2dd6 100644 --- a/stats/stats/src/data_source/kinds/local_db/parameter_traits.rs +++ b/stats/stats/src/data_source/kinds/local_db/parameter_traits.rs @@ -22,10 +22,9 @@ pub trait CreateBehaviour { // generic parameters are to ensure that dependencies in implementations // of this trait match dependencies in `impl DataSource for LocalDbChartSource<..>` -pub trait UpdateBehaviour +pub trait UpdateBehaviour where MainDep: DataSource, - ResolutionDep: DataSource, { /// Update only chart values. /// diff --git a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/mod.rs b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/mod.rs index 28548d13d..441d7b30b 100644 --- a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/mod.rs +++ b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/mod.rs @@ -24,31 +24,22 @@ use crate::{ pub mod parameter_traits; pub mod parameters; -pub struct BatchUpdate( - PhantomData<( - MainDep, - ResolutionDep, - BatchStep, - BatchSizeUpperBound, - Query, - ChartProps, - )>, +pub struct BatchUpdate( + PhantomData<(MainDep, BatchStep, BatchSizeUpperBound, Query, ChartProps)>, ) where MainDep: DataSource, - ResolutionDep: DataSource, - BatchStep: BatchStepBehaviour, + BatchStep: BatchStepBehaviour, BatchSizeUpperBound: Get>, Query: QueryBehaviour>>, ChartProps: ChartProperties; -impl - UpdateBehaviour - for BatchUpdate +impl + UpdateBehaviour + for BatchUpdate where MainDep: DataSource, - ResolutionDep: DataSource, - BatchStep: BatchStepBehaviour, + BatchStep: BatchStepBehaviour, BatchSizeUpperBound: Get>, Query: QueryBehaviour>>, ChartProps: ChartProperties, @@ -91,12 +82,7 @@ where "run {}/{} step of batch update", i + 1, n ); let now = Instant::now(); - let found = batch_update_values_step::< - MainDep, - ResolutionDep, - BatchStep, - ChartProps::Resolution, - >( + let found = batch_update_values_step::( cx, chart_id, min_blockscout_block, @@ -151,7 +137,7 @@ where } /// Returns how many records were found -async fn batch_update_values_step( +async fn batch_update_values_step( cx: &UpdateContext<'_>, chart_id: i32, min_blockscout_block: i64, @@ -161,15 +147,12 @@ async fn batch_update_values_step ) -> Result where MainDep: DataSource, - ResolutionDep: DataSource, Resolution: Timespan, - BatchStep: BatchStepBehaviour, + BatchStep: BatchStepBehaviour, { let query_range = range.into_date_time_range(); let main_data = MainDep::query_data(cx, Some(query_range.clone()), dependency_data_fetch_timer).await?; - let resolution_data = - ResolutionDep::query_data(cx, Some(query_range), dependency_data_fetch_timer).await?; let found = BatchStep::batch_update_values_step_with( cx.db, chart_id, @@ -177,7 +160,6 @@ where min_blockscout_block, last_accurate_point, main_data, - resolution_data, ) .await?; Ok(found) @@ -402,7 +384,7 @@ mod tests { use super::{parameters::mock::StepInput, TimespanDuration}; - type VecStringStepInput = StepInput>, ()>; + type VecStringStepInput = StepInput>>; type SharedInputsStorage = Arc>>; // `OnceLock` in order to return the same instance each time @@ -433,7 +415,6 @@ mod tests { type ThisRecordingBatchUpdate = BatchUpdate< AccountsGrowth, - (), ThisRecordingStep, Batch1Day, DefaultQueryVec, @@ -442,7 +423,6 @@ mod tests { type RecordingChart = LocalDbChartSource< AccountsGrowth, - (), DefaultCreate, ThisRecordingBatchUpdate, DefaultQueryVec, @@ -473,7 +453,7 @@ mod tests { storage: SharedInputsStorage, expected_update_time: Option>, ) { - let mut prev_input: Option<&StepInput>, ()>> = None; + let mut prev_input: Option<&StepInput>>> = None; let expected_update_time = expected_update_time .unwrap_or(DateTime::::from_str("2023-03-01T12:00:00Z").unwrap()); for input in storage.lock().await.deref() { diff --git a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameter_traits.rs b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameter_traits.rs index d2277ccb5..341729ce5 100644 --- a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameter_traits.rs +++ b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameter_traits.rs @@ -8,11 +8,10 @@ use crate::{ UpdateError, }; -pub trait BatchStepBehaviour +pub trait BatchStepBehaviour where Resolution: Timespan, MainInput: Send, - ResolutionInput: Send, { /// Update chart with data from its dependencies. /// @@ -24,6 +23,5 @@ where min_blockscout_block: i64, last_accurate_point: TimespanValue, main_data: MainInput, - resolution_data: ResolutionInput, - ) -> impl Future> + std::marker::Send; + ) -> impl Future> + Send; } diff --git a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/cumulative.rs b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/cumulative.rs index f8242e729..eea32e21e 100644 --- a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/cumulative.rs +++ b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/cumulative.rs @@ -21,7 +21,7 @@ use super::PassVecStep; pub struct AddLastValueStep(PhantomData); impl - BatchStepBehaviour>, ()> + BatchStepBehaviour>> for AddLastValueStep where Resolution: Timespan + Clone + Send + Sync, @@ -36,7 +36,6 @@ where min_blockscout_block: i64, last_accurate_point: TimespanValue, main_data: Vec>, - _resolution_data: (), ) -> Result { let partial_sum = last_accurate_point.value.parse::().map_err(|e| { UpdateError::Internal(format!( @@ -57,7 +56,6 @@ where >, - (), >>::batch_update_values_step_with( db, chart_id, @@ -65,7 +63,6 @@ where min_blockscout_block, last_accurate_point, main_data, - (), ) .await } diff --git a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mock.rs b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mock.rs index 846acfd52..9e4879333 100644 --- a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mock.rs +++ b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mock.rs @@ -11,13 +11,12 @@ use crate::{ use super::PassVecStep; #[derive(Debug, Clone)] -pub struct StepInput { +pub struct StepInput { pub chart_id: i32, pub update_time: DateTime, pub min_blockscout_block: i64, pub last_accurate_point: DateValue, pub main_data: MI, - pub resolution_data: RI, } /// Allows to inspect values passed to each step call; @@ -27,10 +26,10 @@ pub struct RecordingPassStep(PhantomData) where StepsRecorder: Recorder; -impl BatchStepBehaviour>, ()> +impl BatchStepBehaviour>> for RecordingPassStep where - StepsRecorder: Recorder>, ()>>, + StepsRecorder: Recorder>>>, { async fn batch_update_values_step_with( db: &DatabaseConnection, @@ -39,7 +38,6 @@ where min_blockscout_block: i64, last_accurate_point: DateValue, main_data: Vec>, - resolution_data: (), ) -> Result { StepsRecorder::record(StepInput { chart_id, @@ -47,7 +45,6 @@ where min_blockscout_block, last_accurate_point: last_accurate_point.clone(), main_data: main_data.clone(), - resolution_data, }) .await; PassVecStep::batch_update_values_step_with( @@ -57,7 +54,6 @@ where min_blockscout_block, last_accurate_point, main_data, - resolution_data, ) .await } diff --git a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mod.rs b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mod.rs index ce27c16d3..3faef63f2 100644 --- a/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mod.rs +++ b/stats/stats/src/data_source/kinds/local_db/parameters/update/batching/parameters/mod.rs @@ -29,7 +29,7 @@ gettable_const!(Batch30Years: TimespanDuration = TimespanDuration::from_ti /// Pass the vector data from main dependency right into the database pub struct PassVecStep; -impl BatchStepBehaviour>, ()> +impl BatchStepBehaviour>> for PassVecStep where Resolution: Timespan + Clone + Send + Sync, @@ -41,7 +41,6 @@ where min_blockscout_block: i64, _last_accurate_point: TimespanValue, main_data: Vec>, - _resolution_data: (), ) -> Result { let found = main_data.len(); // note: right away cloning another chart will not result in exact copy, diff --git a/stats/stats/src/data_source/kinds/local_db/parameters/update/point.rs b/stats/stats/src/data_source/kinds/local_db/parameters/update/point.rs index 1bba427a6..aff213b95 100644 --- a/stats/stats/src/data_source/kinds/local_db/parameters/update/point.rs +++ b/stats/stats/src/data_source/kinds/local_db/parameters/update/point.rs @@ -12,7 +12,7 @@ use crate::{ /// Store output of the `MainDep` right in the local db pub struct PassPoint(PhantomData); -impl UpdateBehaviour for PassPoint +impl UpdateBehaviour for PassPoint where MainDep: DataSource>, Resolution: Timespan + Clone + Send, diff --git a/stats/stats/src/data_source/kinds/remote_db/mod.rs b/stats/stats/src/data_source/kinds/remote_db/mod.rs index 0a68f44c5..774666e6b 100644 --- a/stats/stats/src/data_source/kinds/remote_db/mod.rs +++ b/stats/stats/src/data_source/kinds/remote_db/mod.rs @@ -53,7 +53,6 @@ pub trait RemoteQueryBehaviour { impl DataSource for RemoteDatabaseSource { type MainDependencies = (); - type ResolutionDependencies = (); type Output = Q::Output; // No local state => no race conditions expected fn mutex_id() -> Option { diff --git a/stats/stats/src/data_source/mod.rs b/stats/stats/src/data_source/mod.rs index d8d230ff7..d50a7b989 100644 --- a/stats/stats/src/data_source/mod.rs +++ b/stats/stats/src/data_source/mod.rs @@ -14,8 +14,7 @@ //! Therefore, each "node" in stats (charts + deps) is represented by a separate type. //! //! All these types have common trait ([`DataSource`]) with relationships -//! being associated types ([`MainDependencies`](DataSource::MainDependencies) and -//! [`ResolutionDependencies`](DataSource::ResolutionDependencies)). +//! being associated types ([`MainDependencies`](DataSource::MainDependencies). //! They can be [initialized](`DataSource::init_recursively`), [updated](DataSource::update_recursively), //! or [queried](DataSource::query_data). //! diff --git a/stats/stats/src/data_source/source.rs b/stats/stats/src/data_source/source.rs index 2f3fbb234..cf59772f3 100644 --- a/stats/stats/src/data_source/source.rs +++ b/stats/stats/src/data_source/source.rs @@ -29,8 +29,6 @@ pub trait DataSource { /// This data source relies on these sources for 'core' of its data. /// Tuple of data sources is also a data source. type MainDependencies: DataSource; - /// Additional data source that is used for computing other data resolutions. - type ResolutionDependencies: DataSource; /// Data that this source provides type Output: Send; @@ -63,8 +61,6 @@ pub trait DataSource { // A → B tracing::debug!("recursively initializing main dependencies"); Self::MainDependencies::init_recursively(db, init_time).await?; - tracing::debug!("recursively initializing resolution dependencies"); - Self::ResolutionDependencies::init_recursively(db, init_time).await?; tracing::debug!("initializing itself"); Self::init_itself(db, init_time).await } @@ -94,7 +90,6 @@ pub trait DataSource { /// combined fn all_dependencies_mutex_ids() -> HashSet { let mut ids = Self::MainDependencies::all_dependencies_mutex_ids(); - ids.extend(Self::ResolutionDependencies::all_dependencies_mutex_ids()); if let Some(self_id) = Self::mutex_id() { let is_not_duplicate = ids.insert(self_id.clone()); // Type system shouldn't allow same type to be present in the dependencies, @@ -127,8 +122,6 @@ pub trait DataSource { tracing::debug!("updating {}", type_name::()); tracing::debug!("recursively updating primary dependency"); Self::MainDependencies::update_recursively(cx).await?; - tracing::debug!("recursively updating secondary dependencies"); - Self::ResolutionDependencies::update_recursively(cx).await?; tracing::debug!("updating itself"); Self::update_itself(cx).await } @@ -171,7 +164,6 @@ pub trait DataSource { // Base case for recursive type impl DataSource for () { type MainDependencies = (); - type ResolutionDependencies = (); type Output = (); fn mutex_id() -> Option { @@ -224,7 +216,6 @@ macro_rules! impl_data_source_for_tuple { ),+ { type MainDependencies = (); - type ResolutionDependencies = (); type Output = ($( $element_generic_name::Output ),+); diff --git a/stats/stats/src/data_source/tests.rs b/stats/stats/src/data_source/tests.rs index d224c9764..2ef53cbcd 100644 --- a/stats/stats/src/data_source/tests.rs +++ b/stats/stats/src/data_source/tests.rs @@ -200,7 +200,7 @@ pub type ContractsGrowthYearly = DirectVecLocalDbChartSource< #[allow(unused)] struct ContractsGrowthCustomBatchStepBehaviour; -impl BatchStepBehaviour>, ()> +impl BatchStepBehaviour>> for ContractsGrowthCustomBatchStepBehaviour { async fn batch_update_values_step_with( @@ -210,7 +210,6 @@ impl BatchStepBehaviour>, ()> _min_blockscout_block: i64, _last_accurate_point: DateValue, _main_data: Vec>, - _resolution_data: (), ) -> Result { // do something (just an example, not intended for running) todo!(); @@ -223,7 +222,6 @@ impl BatchStepBehaviour>, ()> _min_blockscout_block, _last_accurate_point, _main_data, - _resolution_data, ) .await } @@ -232,11 +230,9 @@ impl BatchStepBehaviour>, ()> #[allow(unused)] type AlternativeContractsGrowth = LocalDbChartSource< NewContracts, - (), DefaultCreate, BatchUpdate< NewContracts, - (), ContractsGrowthCustomBatchStepBehaviour, Batch30Days, DefaultQueryVec,