From 1f05a47cdbafaf03442ef9b1e225e4e16adfad5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 12 Feb 2019 14:52:00 +0100 Subject: [PATCH] Set `initialised_block` if we called `initialise_block` (#1767) --- substrate/Cargo.lock | 2 ++ substrate/core/client/src/call_executor.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 1b95ec606c..b579763b98 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "MacTypes-sys" version = "2.1.0" diff --git a/substrate/core/client/src/call_executor.rs b/substrate/core/client/src/call_executor.rs index af09a340a6..9f13bb58d2 100644 --- a/substrate/core/client/src/call_executor.rs +++ b/substrate/core/client/src/call_executor.rs @@ -237,6 +237,11 @@ where native_call, ).map(|(result, _, _)| result)?; + // If the method is `initialise_block` we need to set the `initialised_block` + if method == "Core_initialise_block" { + *initialised_block = Some(*at); + } + self.backend.destroy_state(state)?; Ok(result) }