Return target_hash for finality_target instead of an Option (#9867)

* .

cargo +nightly fmt --all

* Fix test

* Simplify test

* They are already imported

* Needless clone()
This commit is contained in:
Liu-Cheng Xu
2021-09-29 21:03:09 +08:00
committed by GitHub
parent 2deed49706
commit 802afa9f22
5 changed files with 96 additions and 378 deletions
@@ -50,7 +50,7 @@ pub trait SelectChain<Block: BlockT>: Sync + Send + Clone {
&self,
target_hash: <Block as BlockT>::Hash,
_maybe_max_number: Option<NumberFor<Block>>,
) -> Result<Option<<Block as BlockT>::Hash>, Error> {
Ok(Some(target_hash))
) -> Result<<Block as BlockT>::Hash, Error> {
Ok(target_hash)
}
}