From 307fbdc9317bfb669602fd6740f2a65ac5ec461d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 15 Jan 2020 11:39:27 +0100 Subject: [PATCH] Overwrite more storage functions --- runtime/src/validate_block/implementation.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/runtime/src/validate_block/implementation.rs b/runtime/src/validate_block/implementation.rs index aad9bce154..bedc82929c 100644 --- a/runtime/src/validate_block/implementation.rs +++ b/runtime/src/validate_block/implementation.rs @@ -103,7 +103,8 @@ pub fn validate_block>(params: ValidationParams) - sp_io::storage::host_exists.replace_implementation(host_storage_exists), sp_io::storage::host_clear.replace_implementation(host_storage_clear), sp_io::storage::host_root.replace_implementation(host_storage_root), - sp_io::storage::host_clear_prefix.replace_implementation(host_clear_prefix), + sp_io::storage::host_clear_prefix.replace_implementation(host_storage_clear_prefix), + sp_io::storage::host_changes_root.replace_implementation(host_storage_changes_root), ) }; @@ -253,6 +254,11 @@ fn host_storage_root() -> Vec { storage().storage_root() } -fn host_clear_prefix(prefix: &[u8]) { +fn host_storage_clear_prefix(prefix: &[u8]) { storage().clear_prefix(prefix) } + +fn host_storage_changes_root(_: &[u8]) -> Option> { + // TODO implement it properly + None +}