@@ -113,19 +113,19 @@ where
113113 // check if authority has already voted in the same round.
114114 //
115115 // there's a lot of code in `validate_commit` and `import_precommit` functions inside
116- // `finality-grandpa` crate (mostly related to reporing equivocations). But the only thing
116+ // `finality-grandpa` crate (mostly related to reporting equivocations). But the only thing
117117 // that we care about is that only first vote from the authority is accepted
118118 if !votes. insert ( signed. id . clone ( ) ) {
119119 continue
120120 }
121121
122122 // everything below this line can't just `continue`, because state is already altered
123123
124- // all precommits must be for block higher than the target
124+ // precommits aren't allowed for block lower than the target
125125 if signed. precommit . target_number < justification. commit . target_number {
126126 return Err ( Error :: PrecommitIsNotCommitDescendant )
127127 }
128- // all precommits must be for target block descendents
128+ // all precommits must be descendants of target block
129129 chain = chain
130130 . ensure_descendant ( & justification. commit . target_hash , & signed. precommit . target_hash ) ?;
131131 // since we know now that the precommit target is the descendant of the justification
@@ -193,8 +193,8 @@ impl<Header: HeaderT> AncestryChain<Header> {
193193 AncestryChain { parents, unvisited }
194194 }
195195
196- /// Returns `Err (_)` if `precommit_target` is a descendant of the `commit_target` block and
197- /// `Ok (_)` otherwise.
196+ /// Returns `Ok (_)` if `precommit_target` is a descendant of the `commit_target` block and
197+ /// `Err (_)` otherwise.
198198 pub fn ensure_descendant (
199199 mut self ,
200200 commit_target : & Header :: Hash ,
@@ -213,7 +213,7 @@ impl<Header: HeaderT> AncestryChain<Header> {
213213 // `Some(parent_hash)` means that the `current_hash` is in the `parents`
214214 // container `is_visited_before` means that it has been visited before in
215215 // some of previous calls => since we assume that previous call has finished
216- // with `true`, this also will be finished with `true`
216+ // with `true`, this also will be finished with `true`
217217 return Ok ( self )
218218 }
219219
0 commit comments