Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
random fixes (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guanqun Lu authored and gavofyork committed Aug 31, 2018
1 parent d5a4379 commit e6bf0c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions substrate/environmental/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
//! fn main() {
//! // declare a stack variable of the same type as our global declaration.
//! let mut counter_value = 41u32;
//! // call stuff, setting up our `counter` environment as a refrence to our counter_value var.
//! // call stuff, setting up our `counter` environment as a reference to our counter_value var.
//! counter::using(&mut counter_value, stuff);
//! println!("The answer is {:?}", counter_value); // will print 42!
//! stuff(); // safe! doesn't do anything.
Expand Down Expand Up @@ -234,10 +234,11 @@ mod tests {
// declare a stack variable of the same type as our global declaration.
let mut local = 41u32;

// call stuff, setting up our `counter` environment as a refrence to our local counter var.
// call stuff, setting up our `counter` environment as a reference to our local counter var.
counter::using(&mut local, stuff);
assert_eq!(local, 42);
stuff(); // safe! doesn't do anything.
assert_eq!(local, 42);
}

#[test]
Expand Down Expand Up @@ -280,6 +281,8 @@ mod tests {
assert_eq!(local, 42);

stuff(); // doesn't do anything.

assert_eq!(local, 42);
}

#[test]
Expand Down
8 changes: 4 additions & 4 deletions substrate/state-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

//! State database maintenance. Handles finalization and pruning in the database. The input to
//! this module is a `ChangeSet` which is basicall a list of key-value pairs (trie nodes) that
//! this module is a `ChangeSet` which is basically a list of key-value pairs (trie nodes) that
//! were added or deleted during block execution.
//!
//! # Finalization.
Expand Down Expand Up @@ -94,7 +94,7 @@ impl<E: fmt::Debug> fmt::Debug for Error<E> {
pub struct ChangeSet<H: Hash> {
/// Inserted nodes.
pub inserted: Vec<(H, DBValue)>,
/// Delted nodes.
/// Deleted nodes.
pub deleted: Vec<H>,
}

Expand All @@ -108,7 +108,7 @@ pub struct CommitSet<H: Hash> {
pub meta: ChangeSet<Vec<u8>>,
}

/// Pruning contraints. If none are specified pruning is
/// Pruning constraints. If none are specified pruning is
#[derive(Default, Debug, Clone)]
pub struct Constraints {
/// Maximum blocks. Defaults to 0 when unspecified, effectively keeping only unfinalized states.
Expand Down Expand Up @@ -187,7 +187,7 @@ impl<BlockHash: Hash, Key: Hash> StateDbSync<BlockHash, Key> {
match self.mode {
PruningMode::ArchiveAll => {
changeset.deleted.clear();
// write changes immediatelly
// write changes immediately
CommitSet {
data: changeset,
meta: Default::default(),
Expand Down

0 comments on commit e6bf0c7

Please sign in to comment.