From d949e2ae183d02ba4ced26e66f536e3fc2ea459a Mon Sep 17 00:00:00 2001 From: Bjerg Date: Tue, 13 Dec 2022 10:20:47 +0100 Subject: [PATCH] chore: fix some typos (#402) --- crates/executor/src/executor.rs | 22 ++++++++++----------- crates/storage/db/src/abstraction/cursor.rs | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/executor/src/executor.rs b/crates/executor/src/executor.rs index 54466f817..1ba7baa82 100644 --- a/crates/executor/src/executor.rs +++ b/crates/executor/src/executor.rs @@ -22,34 +22,34 @@ pub struct Executor { pub config: Config, } -/// Contains old/new account change +/// Contains old/new account changes #[derive(Debug, Clone, Eq, PartialEq)] pub enum AccountInfoChangeSet { - /// Account is newly created. + /// The account is newly created. Created { - /// Newly created acc + /// The newly created account. new: Account, }, - /// If account is deleted (selfdestructed) or if we have touched - /// a empty account, we would need to remove/destroy it. + /// An account was deleted (selfdestructed) or we have touched + /// an empty account and we need to remove/destroy it. /// (Look at state clearing [EIP-158](https://eips.ethereum.org/EIPS/eip-158)) Destroyed { - /// Old account. + /// The account that was destroyed. old: Account, }, - /// Account is changed. + /// The account was changed. Changed { - /// New account after transaction change. + /// The account after the change. new: Account, - /// Old account before transaction. + /// The account prior to the change. old: Account, }, - /// There is not change in account information (nonce/balance). + /// Nothing was changed for the account (nonce/balance). NoChange, } impl AccountInfoChangeSet { - /// Apply account ChangeSet to db tranasction + /// Apply the changes from the changeset to a database transaction. pub fn apply_to_db<'a, TX: DbTxMut<'a>>( self, address: Address, diff --git a/crates/storage/db/src/abstraction/cursor.rs b/crates/storage/db/src/abstraction/cursor.rs index a0a6a1947..06f319bbb 100644 --- a/crates/storage/db/src/abstraction/cursor.rs +++ b/crates/storage/db/src/abstraction/cursor.rs @@ -36,12 +36,12 @@ pub trait DbCursorRO<'tx, T: Table> { Self: Sized; } -/// Read only curor over DupSort table. +/// Read only cursor over DupSort table. pub trait DbDupCursorRO<'tx, T: DupSort> { /// Seeks for a `(key, value)` pair greater or equal than `key`. fn seek(&mut self, key: T::SubKey) -> PairResult; - /// Returns the next `(key, value)` pair of a DUPSORT table. + /// Returns the next `(key, value)` pair of a DupSort table. fn next_dup(&mut self) -> PairResult; /// Returns the next `(key, value)` pair skipping the duplicates. @@ -50,7 +50,7 @@ pub trait DbDupCursorRO<'tx, T: DupSort> { /// Returns the next `value` of a duplicate `key`. fn next_dup_val(&mut self) -> ValueOnlyResult; - /// Returns an iterator starting at a key greater or equal than `start_key` of a DUPSORT + /// Returns an iterator starting at a key greater or equal than `start_key` of a DupSort /// table. fn walk_dup<'cursor>( &'cursor mut self,