feat: add super trait for block number (#2334)

And also related to a subxt PR
https://github.com/paritytech/subxt/pull/1265
This commit is contained in:
yjh authored and GitHub committed 2023-12-14 22:55:46 +01:00
1 parent 6dece52e9d
commit 2cee874742
5 files changed
+45 -36

No files matched your search

@@ -212,7 +212,7 @@ impl<B: Block> VoterOracle<B> {
// Accept any vote for a GRANDPA finalized block in a better round.
Ok((
rounds.session_start().max(self.best_beefy_block),
(*self.best_grandpa_block_header.number()).into(),
(*self.best_grandpa_block_header.number()),
))
} else {
// Current session has mandatory not done.
@@ -124,7 +124,7 @@ where
let finalized_num = self.client.info().finalized_number;
if finalized_num >= height {
let Ok(Some(hash)) = self.client.block_hash(height.into()) else { return Ok(vec![]) };
let Ok(Some(hash)) = self.client.block_hash(height) else { return Ok(vec![]) };
return Ok(vec![hex_string(&hash.as_ref())])
}