diff --git a/techtree-manager/src/tree.rs b/techtree-manager/src/tree.rs index fef523d..db6a93f 100644 --- a/techtree-manager/src/tree.rs +++ b/techtree-manager/src/tree.rs @@ -2,6 +2,8 @@ use std::collections::BTreeMap; use petgraph::visit::EdgeRef as _; +const HASH_EPOCH: u32 = 0x00000001; + /// Element in the techtree #[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Serialize)] pub struct Element { @@ -420,7 +422,7 @@ impl<'a> Subtree<'a> { .collect(); edges.sort(); - let json_data = serde_json::ser::to_string(&(nodes, edges)).unwrap(); + let json_data = serde_json::ser::to_string(&(nodes, edges, HASH_EPOCH)).unwrap(); sha256::digest(json_data) } }