diff --git a/explorer/src/service/v2/other.rs b/explorer/src/service/v2/other.rs index 6fadfcb..c37711f 100644 --- a/explorer/src/service/v2/other.rs +++ b/explorer/src/service/v2/other.rs @@ -179,6 +179,7 @@ pub struct AddressCountParams { pub start_time: Option, pub end_time: Option, } + #[derive(Serialize, Deserialize)] pub struct AddressCountResponse { count: i64, @@ -192,10 +193,10 @@ pub async fn get_address_count( let mut query_params: Vec = vec![]; if let Some(start_time) = params.start_time { - query_params.push(format!("timestamp > {start_time} ")); + query_params.push(format!("timestamp >= {start_time} ")); } if let Some(end_time) = params.end_time { - query_params.push(format!("timestamp < {end_time} ")); + query_params.push(format!("timestamp <= {end_time} ")); } let mut sql_native = "SELECT count(distinct address) FROM native_addrs ".to_string();