mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
special case equality in ancestry function
This commit is contained in:
@@ -393,6 +393,8 @@ impl<Block: BlockT<Hash=H256>, B, E, N, RA> grandpa::Chain<Block::Hash> for Envi
|
|||||||
NumberFor<Block>: As<u32>,
|
NumberFor<Block>: As<u32>,
|
||||||
{
|
{
|
||||||
fn ancestry(&self, base: Block::Hash, block: Block::Hash) -> Result<Vec<Block::Hash>, GrandpaError> {
|
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(
|
let tree_route_res = ::client::blockchain::tree_route(
|
||||||
self.inner.backend().blockchain(),
|
self.inner.backend().blockchain(),
|
||||||
BlockId::Hash(block),
|
BlockId::Hash(block),
|
||||||
|
|||||||
Reference in New Issue
Block a user