Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into pangolin
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Feb 24, 2021
2 parents 979048e + f1eef7c commit e984983
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frame/dvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,14 @@ impl<T: Trait> Module<T> {
nonce: H64::default(),
};
let mut block = ethereum::Block::new(partial_header, transactions.clone(), ommers);
block.header.state_root = T::StateRoot::get();
// TODO: Switch to `T::StateRoot::get` after upgrade substrate to https://github.com/paritytech/substrate/pull/7714
// block.header.state_root = T::StateRoot::get();
block.header.state_root = {
let mut input = [0u8; 64];
input[..32].copy_from_slice(&frame_system::Module::<T>::parent_hash()[..]);
input[32..64].copy_from_slice(&block.header.hash()[..]);
H256::from_slice(Keccak256::digest(&input).as_slice())
};

let mut transaction_hashes = Vec::new();

Expand Down

0 comments on commit e984983

Please sign in to comment.