v0.3.8-pre.005-fix.001
This commit is contained in:
@@ -85,10 +85,10 @@ pub(crate) use self::raw_account::cursor::raw_account_physical_page_limit;
|
||||
pub(crate) use self::raw_account::get_raw_account_observation;
|
||||
/// Private RAW account state reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_account::get_raw_account_state;
|
||||
/// Private RAW account-state list reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_account::list_raw_account_states;
|
||||
/// Private data-free RAW account-state inspection reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_account::inspect_raw_account_states;
|
||||
/// Private RAW account-state list reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_account::list_raw_account_states;
|
||||
/// Private atomic RAW account acquisition writer consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_account::persist_raw_account_acquisition;
|
||||
/// Private additional RAW account observation writer consumed by the physical backend runtime.
|
||||
@@ -107,10 +107,10 @@ pub(crate) use self::raw_transaction::get_raw_transaction_observation;
|
||||
pub(crate) use self::raw_transaction::get_raw_transaction_retention_state;
|
||||
/// Private RAW transaction tombstone reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_transaction::get_raw_transaction_tombstone;
|
||||
/// Private RAW transaction list reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_transaction::list_raw_transactions;
|
||||
/// Private payload-free RAW transaction inspection reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_transaction::inspect_raw_transactions;
|
||||
/// Private RAW transaction list reader consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_transaction::list_raw_transactions;
|
||||
/// Private atomic RAW transaction acquisition writer consumed by the physical backend runtime.
|
||||
pub(crate) use self::raw_transaction::persist_raw_transaction_acquisition;
|
||||
/// Private additional RAW transaction observation writer consumed by the physical backend runtime.
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-store-postgres-lib/unit_tests/raw_account.rs
|
||||
// version: 6
|
||||
// version: 7
|
||||
|
||||
fn network() -> ksp_store_api::RawNetworkId {
|
||||
return match ksp_store_api::RawNetworkId::new("devnet") {
|
||||
@@ -67,7 +67,7 @@ fn observation_row() -> super::RawAccountObservationDbRow {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
fn inspection_row(data_length_bytes: i64) -> super::RawAccountInspectionDbRow {
|
||||
return super::RawAccountInspectionDbRow {
|
||||
data_length_bytes: std::option::Option::Some(data_length_bytes),
|
||||
executable: std::option::Option::Some(true),
|
||||
|
||||
Reference in New Issue
Block a user