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:
Bastian Köcherandthiolliere authored and Gavin Wood committed 2019-11-28 00:00:28 +00:00
1 parent 39388b826b
commit 3e26fceda4
29 files changed
+253 -165

No files matched your search

+2 -2
View File
@@ -913,7 +913,7 @@ mod tests {
None,
).0.unwrap();
assert!(t.ext().storage_changes_root(GENESIS_HASH.into()).unwrap().is_some());
assert!(t.ext().storage_changes_root(&GENESIS_HASH.encode()).unwrap().is_some());
}
#[test]
@@ -929,7 +929,7 @@ mod tests {
None,
).0.unwrap();
assert!(t.ext().storage_changes_root(GENESIS_HASH.into()).unwrap().is_some());
assert!(t.ext().storage_changes_root(&GENESIS_HASH.encode()).unwrap().is_some());
}
#[test]