From fb3386a5f3bf280978757cad0a2a909d82e70e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= <bkchr@users.noreply.github.com> Date: Fri, 27 Mar 2020 12:02:37 +0100 Subject: [PATCH] Clarify when `changes_root` returns `None` (#5428) --- substrate/primitives/io/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrate/primitives/io/src/lib.rs b/substrate/primitives/io/src/lib.rs index a6dcfd1b76a..78006589747 100644 --- a/substrate/primitives/io/src/lib.rs +++ b/substrate/primitives/io/src/lib.rs @@ -286,7 +286,8 @@ pub trait Storage { /// /// The hashing algorithm is defined by the `Block`. /// - /// Returns an `Option` that holds the SCALE encoded hash. + /// Returns an `Some(_)` which holds the SCALE encoded hash or `None` when + /// changes trie is disabled. fn changes_root(&mut self, parent_hash: &[u8]) -> Option<Vec<u8>> { self.storage_changes_root(parent_hash) .expect("Invalid `parent_hash` given to `changes_root`.") -- GitLab