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

Renaming from 'intermediate_take' to 'intermediate_remove'
This commit is contained in:
Davide Galassi
2022-09-21 11:42:12 +02:00
committed by GitHub
parent c6a9abcc68
commit 6c7020bb16
7 changed files with 32 additions and 46 deletions
+4 -4
View File
@@ -587,7 +587,7 @@ mod tests {
RuntimeAppPublic,
};
use sp_timestamp;
use std::{borrow::Cow, sync::Arc};
use std::sync::Arc;
type AccountPublic = <Signature as Verify>::Signer;
@@ -733,9 +733,9 @@ mod tests {
let mut params = BlockImportParams::new(BlockOrigin::File, new_header);
params.post_digests.push(item);
params.body = Some(new_body);
params.intermediates.insert(
Cow::from(INTERMEDIATE_KEY),
Box::new(BabeIntermediate::<Block> { epoch_descriptor }) as Box<_>,
params.insert_intermediate(
INTERMEDIATE_KEY,
BabeIntermediate::<Block> { epoch_descriptor },
);
params.fork_choice = Some(ForkChoiceStrategy::LongestChain);