pub fn encode_and_hash(node: &TreeNode) -> Result<(Vec<u8>, Hash), CodecError>
Encode a tree node and compute its hash