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
@@ -118,10 +118,10 @@ where
)
.await
} else {
Ok(Some(pending_change.canon_hash))
Ok(pending_change.canon_hash)
};
if let Ok(Some(hash)) = effective_block_hash {
if let Ok(hash) = effective_block_hash {
if let Ok(Some(header)) = self.inner.header(BlockId::Hash(hash)) {
if *header.number() == pending_change.effective_number() {
out.push((header.hash(), *header.number()));