mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Update readme
This commit is contained in:
@@ -17,7 +17,7 @@ fn main() {
|
|||||||
let foo = Foo {
|
let foo = Foo {
|
||||||
a: 42,
|
a: 42,
|
||||||
b: vec![1, 2, 3]
|
b: vec![1, 2, 3]
|
||||||
}
|
};
|
||||||
|
|
||||||
println!("root: {}", foo.tree_hash_root());
|
println!("root: {}", foo.tree_hash_root());
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ fn main() {
|
|||||||
|
|
||||||
|
|
||||||
let mut hasher = CachedTreeHasher::new(&bar).unwrap();
|
let mut hasher = CachedTreeHasher::new(&bar).unwrap();
|
||||||
hasher.update(&modified_bar);
|
hasher.update(&modified_bar).unwrap();
|
||||||
|
|
||||||
// Assert that the cached tree hash matches a standard tree hash.
|
// Assert that the cached tree hash matches a standard tree hash.
|
||||||
assert_eq!(hasher.tree_hash_root(), modified_bar.tree_hash_root());
|
assert_eq!(hasher.tree_hash_root(), modified_bar.tree_hash_root());
|
||||||
|
|||||||
Reference in New Issue
Block a user