From 903cd4e8010698a36c3cd74b727ba66adb4b40f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Sat, 11 Jul 2020 20:47:38 +0200 Subject: [PATCH] Clarify some host interfaces (#6626) --- substrate/primitives/io/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/substrate/primitives/io/src/lib.rs b/substrate/primitives/io/src/lib.rs index c75c8e67cc..dc86ff2d6e 100644 --- a/substrate/primitives/io/src/lib.rs +++ b/substrate/primitives/io/src/lib.rs @@ -134,7 +134,7 @@ pub trait Storage { /// /// The hashing algorithm is defined by the `Block`. /// - /// Returns the SCALE encoded hash. + /// Returns a `Vec` that holds the SCALE encoded hash. fn root(&mut self) -> Vec { self.storage_root() } @@ -144,7 +144,7 @@ pub trait Storage { /// /// The hashing algorithm is defined by the `Block`. /// - /// Returns an `Some(_)` which holds the SCALE encoded hash or `None` when + /// Returns `Some(Vec)` which holds the SCALE encoded hash or `None` when /// changes trie is disabled. fn changes_root(&mut self, parent_hash: &[u8]) -> Option> { self.storage_changes_root(parent_hash) @@ -306,7 +306,7 @@ pub trait DefaultChildStorage { /// "Commit" all existing operations and compute the resulting child storage root. /// The hashing algorithm is defined by the `Block`. /// - /// Returns the SCALE encoded hash. + /// Returns a `Vec` that holds the SCALE encoded hash. fn root( &mut self, storage_key: &[u8], @@ -379,7 +379,8 @@ pub trait Misc { /// Extract the runtime version of the given wasm blob by calling `Core_version`. /// - /// Returns the SCALE encoded runtime version and `None` if the call failed. + /// Returns `None` if calling the function failed for any reason or `Some(Vec)` where + /// the `Vec` holds the SCALE encoded runtime version. /// /// # Performance ///