From 63eca8b1cac5c055c3593e70fc77c7eed16cd854 Mon Sep 17 00:00:00 2001 From: ade <93547199+oxade@users.noreply.github.com> Date: Wed, 23 Mar 2022 19:42:30 -0400 Subject: [PATCH] Removing mentions of old client in gateway (#1054) --- sui/src/gateway.rs | 2 +- sui_core/src/authority_aggregator.rs | 4 ++-- sui_core/src/gateway_state.rs | 3 +-- sui_core/src/gateway_state/gateway_store.rs | 2 +- sui_core/src/unit_tests/{client_tests.rs => gateway_tests.rs} | 0 5 files changed, 5 insertions(+), 6 deletions(-) rename sui_core/src/unit_tests/{client_tests.rs => gateway_tests.rs} (100%) diff --git a/sui/src/gateway.rs b/sui/src/gateway.rs index 839c9fca4558a..ceaefb65aa8ff 100644 --- a/sui/src/gateway.rs +++ b/sui/src/gateway.rs @@ -35,7 +35,7 @@ impl Display for GatewayType { writeln!(writer, "Gateway Type : Embedded")?; writeln!( writer, - "Client state DB folder path : {:?}", + "Gateway state DB folder path : {:?}", config.db_folder_path )?; let authorities = config diff --git a/sui_core/src/authority_aggregator.rs b/sui_core/src/authority_aggregator.rs index ec5cd8b9f2950..a78b1c9a28c50 100644 --- a/sui_core/src/authority_aggregator.rs +++ b/sui_core/src/authority_aggregator.rs @@ -29,8 +29,8 @@ const OBJECT_DOWNLOAD_CHANNEL_BOUND: usize = 1024; pub const DEFAULT_RETRIES: usize = 4; #[cfg(test)] -#[path = "unit_tests/client_tests.rs"] -mod client_tests; +#[path = "unit_tests/gateway_tests.rs"] +mod gateway_tests; pub type AsyncResult<'a, T, E> = future::BoxFuture<'a, Result>; diff --git a/sui_core/src/gateway_state.rs b/sui_core/src/gateway_state.rs index f07c4e9767e2e..91b7bb7f5dbea 100644 --- a/sui_core/src/gateway_state.rs +++ b/sui_core/src/gateway_state.rs @@ -182,7 +182,6 @@ pub trait GatewayAPI { ) -> Result; /// Get the object information - /// TODO: move this out to AddressManager async fn get_object_info(&self, object_id: ObjectID) -> Result; /// Get refs of all objects we own from local cache. @@ -383,7 +382,7 @@ impl AccountState { /// It is important to check that the object is not locked before locking again /// One should call can_lock_or_unlock before locking as this overwrites the previous lock /// If the object is already locked, ensure it is unlocked by calling unlock_pending_transaction_objects - /// Client runs sequentially right now so access to this is safe + /// Gateway runs sequentially right now so access to this is safe /// Double-locking can cause equivocation. TODO: https://github.com/MystenLabs/sui/issues/335 pub fn lock_pending_transaction_objects( &self, diff --git a/sui_core/src/gateway_state/gateway_store.rs b/sui_core/src/gateway_state/gateway_store.rs index 5109487a473df..c255a697018f6 100644 --- a/sui_core/src/gateway_state/gateway_store.rs +++ b/sui_core/src/gateway_state/gateway_store.rs @@ -23,7 +23,7 @@ const MANAGED_ADDRESS_SUBDIR: &str = "managed_addresses"; /// The address manager allows multiple addresses to be managed by one store. /// It also manages the different DB locations and in future, the configurations /// Dir Structure -/// AddressManagerStore +/// GatewayStore /// | /// ------ SingleAddressStore1 /// | diff --git a/sui_core/src/unit_tests/client_tests.rs b/sui_core/src/unit_tests/gateway_tests.rs similarity index 100% rename from sui_core/src/unit_tests/client_tests.rs rename to sui_core/src/unit_tests/gateway_tests.rs