Additional state check. (#2915)

* check resulting state root on import.

* get root from last method.

* Fix test runtime (was changing state after root calculation).

* Do reset new authorities (just take before root calculation).

* bump impl runtime version.

* Update core/sr-api-macros/tests/trybuild.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
cheme
2019-06-26 16:28:12 +02:00
committed by Bastian Köcher
parent 443ad90b47
commit f69c48c7b8
7 changed files with 46 additions and 14 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ where
}
/// Get the transaction necessary to update the backend.
pub fn transaction(mut self) -> (B::Transaction, Option<MemoryDB<H>>) {
pub fn transaction(mut self) -> ((B::Transaction, H::Out), Option<MemoryDB<H>>) {
let _ = self.storage_root();
let (storage_transaction, changes_trie_transaction) = (
@@ -126,7 +126,7 @@ where
);
(
storage_transaction.0,
storage_transaction,
changes_trie_transaction,
)
}