Skip to content

Commit

Permalink
fill in hasher for genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshOrndorff committed Apr 16, 2024
1 parent b6c0ac2 commit cfa821e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tuxedo-core/src/genesis/block_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use sc_client_api::backend::{Backend, BlockImportOperation};
use sc_executor::RuntimeVersionOf;
use sp_core::traits::CodeExecutor;
use sp_runtime::{
traits::{Block as BlockT, Hash as HashT, Header as HeaderT, Zero},
traits::{Block as BlockT, Hash as HashT, HashingFor, Header as HeaderT, Zero},
BuildStorage,
};
use std::sync::Arc;
Expand Down Expand Up @@ -58,8 +58,10 @@ impl<'a, Block: BlockT, B: Backend<Block>, E: RuntimeVersionOf + CodeExecutor>
.build_storage()
.map_err(sp_blockchain::Error::Storage)?;

let state_version =
sc_chain_spec::resolve_state_version_from_wasm(&genesis_storage, &self.executor)?;
let state_version = sc_chain_spec::resolve_state_version_from_wasm::<_, HashingFor<B>>(
&genesis_storage,
&self.executor,
)?;

let extrinsics = match genesis_storage.top.remove(crate::EXTRINSIC_KEY) {
Some(v) => <Vec<<Block as BlockT>::Extrinsic>>::decode(&mut &v[..]).unwrap_or_default(),
Expand Down

0 comments on commit cfa821e

Please sign in to comment.