perf: remove unnecessary state clone (#4763)

This commit is contained in:
Roman Krasiuk
2023-09-25 16:48:48 +03:00
committed by GitHub
parent 1b17453261
commit 0f9def08c0
12 changed files with 15 additions and 15 deletions

View File

@ -210,7 +210,7 @@ impl AppendableChain {
// check state root if the block extends the canonical chain.
if block_kind.extends_canonical_head() {
// check state root
let state_root = provider.state_root(bundle_state.clone())?;
let state_root = provider.state_root(&bundle_state)?;
if block.state_root != state_root {
return Err(ConsensusError::BodyStateRootDiff {
got: state_root,