mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
The storage runtime interface should not enforce a hash type (#4231)
* The storage runtime interface should not enforce a hash type Currently the runtime interface enforces `H256` as hash type, but in the future people could use whatever they want as hash type. The hash type always needs to match between the runtime and the node, but that is already required. * Update primitives/externalities/src/lib.rs Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
committed by
Gavin Wood
parent
39388b826b
commit
3e26fceda4
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
use std::collections::btree_map::Entry;
|
||||
use codec::Decode;
|
||||
use codec::{Decode, Encode};
|
||||
use hash_db::Hasher;
|
||||
use num_traits::One;
|
||||
use crate::backend::Backend;
|
||||
@@ -47,6 +47,7 @@ pub(crate) fn prepare_input<'a, B, H, Number>(
|
||||
where
|
||||
B: Backend<H>,
|
||||
H: Hasher + 'a,
|
||||
H::Out: Encode,
|
||||
Number: BlockNumber,
|
||||
{
|
||||
let number = parent.number.clone() + One::one();
|
||||
@@ -200,7 +201,7 @@ fn prepare_digest_input<'a, H, Number>(
|
||||
), String>
|
||||
where
|
||||
H: Hasher,
|
||||
H::Out: 'a,
|
||||
H::Out: 'a + Encode,
|
||||
Number: BlockNumber,
|
||||
{
|
||||
let build_skewed_digest = config.end.as_ref() == Some(&block);
|
||||
|
||||
Reference in New Issue
Block a user