Skip to content

Commit 7f8a2d0

Browse files
committed
simplify check_block
1 parent 4cb23b2 commit 7f8a2d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

node/src/consensus/hybrid_import_queue.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub struct HybridBlockImport {
6363
>,
6464
>,
6565
babe_link: BabeLink<Block>,
66+
client: Arc<FullClient>,
6667
}
6768

6869
impl HybridBlockImport {
@@ -92,6 +93,7 @@ impl HybridBlockImport {
9293
inner_aura,
9394
inner_babe,
9495
babe_link,
96+
client,
9597
}
9698
}
9799

@@ -108,7 +110,10 @@ impl BlockImport<Block> for HybridBlockImport {
108110
&self,
109111
block: BlockCheckParams<Block>,
110112
) -> Result<ImportResult, Self::Error> {
111-
self.inner_aura.check_block(block).await.map_err(Into::into)
113+
// The Babe and Aura `BlockImport` implementations both defer to the inner
114+
// client's `check_block` implementation defined here:
115+
// https://github.com/opentensor/polkadot-sdk/blob/d13f915d8a1f55af53fd51fdb4544c47badddc7e/substrate/client/service/src/client/client.rs#L1748.
116+
self.client.check_block(block).await.map_err(Into::into)
112117
}
113118

114119
async fn import_block(

0 commit comments

Comments
 (0)