Skip to content
Snippets Groups Projects
Commit 4307a555 authored by asynchronous rob's avatar asynchronous rob
Browse files

special case equality in `ancestry` function

parent a2ba7b71
No related merge requests found
......@@ -393,6 +393,8 @@ impl<Block: BlockT<Hash=H256>, B, E, N, RA> grandpa::Chain<Block::Hash> for Envi
NumberFor<Block>: As<u32>,
{
fn ancestry(&self, base: Block::Hash, block: Block::Hash) -> Result<Vec<Block::Hash>, GrandpaError> {
if base == block { return Err(NotDescendent) }
let tree_route_res = ::client::blockchain::tree_route(
self.inner.backend().blockchain(),
BlockId::Hash(block),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment