diff --git a/core/src/merkle_tree.rs b/core/src/merkle_tree.rs index 750337ba..93470db8 100644 --- a/core/src/merkle_tree.rs +++ b/core/src/merkle_tree.rs @@ -208,7 +208,12 @@ mod test { #[test] /// Check the root of the tree with a single item, with the manual calculation. fn root_of_single_item_tree() { - // TODO + let key: Hash256 = Hash256::hash("hello world"); + let merkle_tree: OneshotMerkleTree = OneshotMerkleTree::create(Vec::from([key])); + let root_hash: Hash256 = OneshotMerkleTree::root(&merkle_tree); + + assert!(root_hash == key); + assert!(merkle_tree.hash_list.len() == 1); } #[test]