Allow missing functions when checking the new runtime's version (#5741)

This commit is contained in:
Bastian Köcher
2020-04-23 14:54:52 +02:00
committed by GitHub
parent fd65c3807c
commit 46677555ac
13 changed files with 73 additions and 16 deletions
+12 -1
View File
@@ -329,7 +329,18 @@ pub trait Misc {
self.extension::<CallInWasmExt>()
.expect("No `CallInWasmExt` associated for the current context!")
.call_in_wasm(wasm, None, "Core_version", &[], &mut ext)
.call_in_wasm(
wasm,
None,
"Core_version",
&[],
&mut ext,
// If a runtime upgrade introduces new host functions that are not provided by
// the node, we should not fail at instantiation. Otherwise nodes that are
// updated could run this successfully and it could lead to a storage root
// mismatch when importing this block.
sp_core::traits::MissingHostFunctions::Allow,
)
.ok()
}
}