v0.3.8-pre.005-fix.001
This commit is contained in:
@@ -226,10 +226,7 @@ pub(crate) async fn inspect_raw_account_states(
|
||||
query: &ksp_store_api::RawAccountStateInspectionQuery,
|
||||
) -> std::result::Result<ksp_store_api::RawInspectionPage<ksp_store_api::RawAccountStateSummary>, crate::PostgresBackendError> {
|
||||
if query.network() != network {
|
||||
return std::result::Result::Err(crate::PostgresBackendError::new(
|
||||
crate::PostgresBackendErrorKind::WrongNetwork,
|
||||
"raw_account_inspection_network",
|
||||
));
|
||||
return std::result::Result::Err(crate::PostgresBackendError::new(crate::PostgresBackendErrorKind::WrongNetwork, "raw_account_inspection_network"));
|
||||
}
|
||||
let sql = match query.direction() {
|
||||
ksp_store_api::RawSortDirection::Ascending => INSPECT_ACCOUNT_STATES_ASC_SQL,
|
||||
@@ -1042,9 +1039,7 @@ fn raw_account_inspection_empty_page_is_clean(row: &RawAccountInspectionDbRow) -
|
||||
&& row.state_hash.is_none();
|
||||
}
|
||||
|
||||
fn raw_account_inspection_sql_window(
|
||||
page: ksp_store_api::RawInspectionPageRequest,
|
||||
) -> std::result::Result<(i64, i64), crate::PostgresBackendError> {
|
||||
fn raw_account_inspection_sql_window(page: ksp_store_api::RawInspectionPageRequest) -> std::result::Result<(i64, i64), crate::PostgresBackendError> {
|
||||
let sql_limit = match i64::try_from(page.limit().get()) {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(_) => {
|
||||
@@ -1057,10 +1052,7 @@ fn raw_account_inspection_sql_window(
|
||||
let sql_offset = match i64::try_from(page.offset()) {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(_) => {
|
||||
return std::result::Result::Err(crate::PostgresBackendError::new(
|
||||
crate::PostgresBackendErrorKind::QueryInvalid,
|
||||
"raw_account_inspection_offset",
|
||||
));
|
||||
return std::result::Result::Err(crate::PostgresBackendError::new(crate::PostgresBackendErrorKind::QueryInvalid, "raw_account_inspection_offset"));
|
||||
},
|
||||
};
|
||||
return std::result::Result::Ok((sql_limit, sql_offset));
|
||||
|
||||
Reference in New Issue
Block a user