Skip to content
Snippets Groups Projects
Unverified Commit 363bd6bd authored by tmpolaczyk's avatar tmpolaczyk Committed by GitHub
Browse files

Remove clones from block seal function (#7917)

Shouldn't matter much, but this is run on every produced block so free
performance
parent 4c74a109
Branches
No related merge requests found
Pipeline #519057 waiting for manual action with stages
in 1 hour, 15 minutes, and 11 seconds
......@@ -398,7 +398,7 @@ where
aura_internal::seal::<_, P>(&pre_hash, &author_pub, keystore).map_err(Box::new)?;
let mut block_import_params = BlockImportParams::new(BlockOrigin::Own, pre_header);
block_import_params.post_digests.push(seal_digest);
block_import_params.body = Some(body.clone());
block_import_params.body = Some(body);
block_import_params.state_action =
StateAction::ApplyChanges(sc_consensus::StorageChanges::Changes(storage_changes));
block_import_params.fork_choice = Some(ForkChoiceStrategy::LongestChain);
......
......@@ -141,7 +141,7 @@ where
})?;
let signature = signature
.clone()
.as_slice()
.try_into()
.map_err(|_| ConsensusError::InvalidSignature(signature, public.to_raw_vec()))?;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment