diff --git a/crates/supervisor/core/src/error.rs b/crates/supervisor/core/src/error.rs index 08622fb595..9059c769c8 100644 --- a/crates/supervisor/core/src/error.rs +++ b/crates/supervisor/core/src/error.rs @@ -29,11 +29,11 @@ pub enum SupervisorError { #[error(transparent)] SpecError(#[from] SpecError), - /// Indicates that error occurred while interacting with the storage layer. + /// Indicates that an error occurred while interacting with the storage layer. #[error(transparent)] StorageError(#[from] StorageError), - /// Indicates that managed node not found for the chain. + /// Indicates that the managed node was not found for the chain. #[error("managed node not found for chain: {0}")] ManagedNodeMissing(u64), diff --git a/crates/supervisor/core/src/safety_checker/error.rs b/crates/supervisor/core/src/safety_checker/error.rs index 4201b21e55..78d5c6a7c9 100644 --- a/crates/supervisor/core/src/safety_checker/error.rs +++ b/crates/supervisor/core/src/safety_checker/error.rs @@ -31,7 +31,7 @@ pub enum CrossSafetyError { #[error("promotion to level {0} is not supported")] UnsupportedTargetLevel(SafetyLevel), - /// Indicates that error occurred while validating block + /// Indicates that an error occurred while validating block #[error(transparent)] ValidationError(#[from] ValidationError), } @@ -40,7 +40,7 @@ pub enum CrossSafetyError { /// These errors indicate that the block must be invalidated. #[derive(Debug, Error, PartialEq, Eq)] pub enum ValidationError { - /// Indicates that error occurred while validating interop config for the block messages + /// Indicates that an error occurred while validating interop config for the block messages #[error(transparent)] InteropValidationError(#[from] InteropValidationError), @@ -75,7 +75,7 @@ pub enum ValidationError { /// Cyclic dependency detected involving the candidate block #[error("cyclic dependency detected while promoting block {block}")] CyclicDependency { - /// The candidate block which is creating cyclic dependency + /// The candidate block that is creating a cyclic dependency block: BlockInfo, }, } diff --git a/crates/supervisor/storage/src/chaindb.rs b/crates/supervisor/storage/src/chaindb.rs index 376f0fd6ac..e55b433e7f 100644 --- a/crates/supervisor/storage/src/chaindb.rs +++ b/crates/supervisor/storage/src/chaindb.rs @@ -69,7 +69,7 @@ impl ChainDb { } } -// todo: make sure all get method return DatabaseNotInitialised error if db is not initialised +// todo: make sure all get methods return DatabaseNotInitialised error if db is not initialised impl DerivationStorageReader for ChainDb { fn derived_to_source(&self, derived_block_id: BlockNumHash) -> Result { self.observe_call(Metrics::STORAGE_METHOD_DERIVED_TO_SOURCE, || { @@ -178,7 +178,7 @@ impl DerivationStorageWriter for ChainDb { } } -// todo: make sure all get method return DatabaseNotInitialised error if db is not initialised +// todo: make sure all get methods return DatabaseNotInitialised error if db is not initialised impl LogStorageReader for ChainDb { fn get_latest_block(&self) -> Result { self.observe_call(Metrics::STORAGE_METHOD_GET_LATEST_BLOCK, || { diff --git a/crates/supervisor/storage/src/error.rs b/crates/supervisor/storage/src/error.rs index f7b0f2b75f..4dd652fff6 100644 --- a/crates/supervisor/storage/src/error.rs +++ b/crates/supervisor/storage/src/error.rs @@ -27,11 +27,11 @@ pub enum StorageError { #[error("data not yet available")] FutureData, - /// Represents an error that occurred when database is not initialized. + /// Represents an error that occurred when the database is not initialized. #[error("database not initialized")] DatabaseNotInitialised, - /// Represents a conflict occurred while attempting to write to the database. + /// Represents an error that occurred while attempting to write to the database due to a conflict. #[error("conflicting data")] ConflictError, @@ -39,7 +39,7 @@ pub enum StorageError { #[error("latest stored block is not parent of the incoming block")] BlockOutOfOrder, - /// Represents an error that occurred when there is inconsistency in log storage + /// Represents an error that occurs when there is inconsistency in log storage #[error("reorg required due to inconsistent storage state")] ReorgRequired,