From ae9b65996996571d70ba5838e96cb9ba3dedbf54 Mon Sep 17 00:00:00 2001 From: cheme Date: Tue, 19 Jan 2021 11:12:11 +0100 Subject: [PATCH] Ignore offchain indexing in validation function. (#297) * Missing set_offchain_storage overload. * right name * Ignore offchain indexing in validation function. --- cumulus/runtime/src/validate_block/implementation.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cumulus/runtime/src/validate_block/implementation.rs b/cumulus/runtime/src/validate_block/implementation.rs index 50ee63233c..787648feaa 100644 --- a/cumulus/runtime/src/validate_block/implementation.rs +++ b/cumulus/runtime/src/validate_block/implementation.rs @@ -130,6 +130,10 @@ pub fn validate_block>(params: ValidationParams) - .replace_implementation(host_default_child_storage_root), sp_io::default_child_storage::host_next_key .replace_implementation(host_default_child_storage_next_key), + sp_io::offchain_index::host_set + .replace_implementation(host_offchain_index_set), + sp_io::offchain_index::host_clear + .replace_implementation(host_offchain_index_clear), ); set_and_run_with_externalities(&mut ext, || { @@ -489,3 +493,7 @@ fn host_default_child_storage_next_key(storage_key: &[u8], key: &[u8]) -> Option let child_info = ChildInfo::new_default(storage_key); with_externalities(|ext| ext.next_child_storage_key(&child_info, key)) } + +fn host_offchain_index_set(_key: &[u8], _value: &[u8]) { } + +fn host_offchain_index_clear(_key: &[u8]) { }