Skip to content

Commit 4bc81b4

Browse files
Seulgi Kimsgkim126
authored andcommitted
Fix wrong comments
1 parent 0128b44 commit 4bc81b4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

util/hashdb/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
1616

17-
//! Database of byte-slices keyed to their Keccak hash.
17+
//! Database of byte-slices keyed to their blake2b hash.
1818
extern crate primitives;
1919

2020
use primitives::H256;
@@ -23,7 +23,7 @@ use std::collections::HashMap;
2323
/// `HashDB` value type.
2424
pub type DBValue = Vec<u8>;
2525

26-
/// Trait modelling datastore keyed by a 32-byte Keccak hash.
26+
/// Trait modelling datastore keyed by a 32-byte blake2b hash.
2727
pub trait HashDB: AsHashDB + Send + Sync {
2828
/// Get the keys in the database together with number of underlying references.
2929
fn keys(&self) -> HashMap<H256, i32>;
@@ -32,7 +32,7 @@ pub trait HashDB: AsHashDB + Send + Sync {
3232
/// hash is not known.
3333
fn get(&self, key: &H256) -> Option<DBValue>;
3434

35-
/// Check for the existance of a hash-key.
35+
/// Check for the existence of a hash-key.
3636
fn contains(&self, key: &H256) -> bool;
3737

3838
/// Insert a datum item into the DB and return the datum's hash for a later lookup. Insertions

util/journaldb/src/traits.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub trait JournalDB: HashDB {
4444
fn latest_era(&self) -> Option<u64>;
4545

4646
/// Journal recent database operations as being associated with a given era and id.
47-
// TODO: give the overlay to this function so journaldbs don't manage the overlays themeselves.
47+
// TODO: give the overlay to this function so journaldbs don't manage the overlays themselves.
4848
fn journal_under(&mut self, batch: &mut DBTransaction, now: u64, id: &H256) -> Result<u32, UtilError>;
4949

5050
/// Mark a given block as canonical, indicating that competing blocks' states may be pruned out.
@@ -70,8 +70,8 @@ pub trait JournalDB: HashDB {
7070
/// Get backing database.
7171
fn backing(&self) -> &Arc<dyn kvdb::KeyValueDB>;
7272

73-
/// Clear internal strucutres. This should called after changes have been written
74-
/// to the backing strage
73+
/// Clear internal structures. This should called after changes have been written
74+
/// to the backing storage.
7575
fn flush(&self) {}
7676

7777
/// Consolidate all the insertions and deletions in the given memory overlay.

util/merkle/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub type Result<T> = ::std::result::Result<T, TrieError>;
6868
/// Description of what kind of query will be made to the trie.
6969
pub type Query<T> = dyn Fn(&[u8]) -> T;
7070

71-
/// A key-value datastore implemented as a database-backed modified Merkle tree.
71+
/// A key-value datastore implemented as a database-backed Merkle trie.
7272
pub trait Trie {
7373
/// Return the root of the trie.
7474
fn root(&self) -> &H256;
@@ -93,7 +93,7 @@ pub trait Trie {
9393
fn get_with<T>(&self, key: &[u8], query: &Query<T>) -> Result<Option<T>>;
9494
}
9595

96-
/// A key-value datastore implemented as a database-backed modified Merkle tree.
96+
/// A key-value datastore implemented as a database-backed Merkle trie.
9797
pub trait TrieMut {
9898
/// Return the root of the trie.
9999
fn root(&self) -> &H256;

0 commit comments

Comments
 (0)