mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
Split BlockImport and JustificationImport (#1521)
* Split BlockImport and JustificationImport * Remove unused trait impl * Fix compile * Fix grandpa tests * Fix network tests
This commit is contained in:
committed by
Robert Habermeier
parent
14e8be794f
commit
dd88dc6cd6
@@ -1106,7 +1106,6 @@ impl<B, E, Block, RA> CallRuntimeAt<Block> for Client<B, E, Block, RA> where
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl<B, E, Block, RA> consensus::BlockImport<Block> for Client<B, E, Block, RA> where
|
||||
B: backend::Backend<Block, Blake2Hasher>,
|
||||
E: CallExecutor<Block, Blake2Hasher> + Clone + Send + Sync,
|
||||
@@ -1179,19 +1178,6 @@ impl<B, E, Block, RA> consensus::BlockImport<Block> for Client<B, E, Block, RA>
|
||||
);
|
||||
result.map_err(|e| ConsensusErrorKind::ClientImport(e.to_string()).into())
|
||||
}
|
||||
|
||||
/// Import a block justification and finalize the block. The justification
|
||||
/// isn't interpreted by the client and is assumed to have been validated
|
||||
/// previously. The block is finalized unconditionally.
|
||||
fn import_justification(
|
||||
&self,
|
||||
hash: Block::Hash,
|
||||
_number: NumberFor<Block>,
|
||||
justification: Justification,
|
||||
) -> Result<(), Self::Error> {
|
||||
self.finalize_block(BlockId::Hash(hash), Some(justification), true)
|
||||
.map_err(|_| ConsensusErrorKind::InvalidJustification.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl<B, E, Block, RA> consensus::Authorities<Block> for Client<B, E, Block, RA> where
|
||||
|
||||
Reference in New Issue
Block a user