Introduce 'intermediate_insert' method to hide implementation details (#12215)

Renaming from 'intermediate_take' to 'intermediate_remove'
This commit is contained in:
Davide Galassi authored and GitHub committed 2022-09-21 09:42:12 +00:00
1 parent c6a9abcc68
commit 6c7020bb16
7 files changed
+32 -46

No files matched your search

+2 -4
View File
@@ -642,10 +642,8 @@ fn propose_and_import_block<Transaction: Send + 'static>(
let mut import = BlockImportParams::new(BlockOrigin::Own, block.header);
import.post_digests.push(seal);
import.body = Some(block.extrinsics);
import.intermediates.insert(
Cow::from(INTERMEDIATE_KEY),
Box::new(BabeIntermediate::<TestBlock> { epoch_descriptor }) as Box<_>,
);
import
.insert_intermediate(INTERMEDIATE_KEY, BabeIntermediate::<TestBlock> { epoch_descriptor });
import.fork_choice = Some(ForkChoiceStrategy::LongestChain);
let import_result = block_on(block_import.import_block(import, Default::default())).unwrap();