refactor: replace with EMPTY_WORD, ZERO and ONE

This commit is contained in:
Andrey Khmuro
2023-08-31 16:22:03 +02:00
parent 51d527b568
commit 2f09410e87
13 changed files with 46 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
use super::{
BTreeMap, BTreeSet, InnerNodeInfo, MerkleError, MerklePath, NodeIndex, Rpo256, RpoDigest,
ValuePath, Vec, Word, ZERO,
ValuePath, Vec, Word, EMPTY_WORD,
};
use crate::utils::{
format, string::String, vec, word_to_hex, ByteReader, ByteWriter, Deserializable,
@@ -18,7 +18,7 @@ mod tests;
const ROOT_INDEX: NodeIndex = NodeIndex::root();
/// An RpoDigest consisting of 4 ZERO elements.
const EMPTY_DIGEST: RpoDigest = RpoDigest::new([ZERO; 4]);
const EMPTY_DIGEST: RpoDigest = RpoDigest::new(EMPTY_WORD);
// PARTIAL MERKLE TREE
// ================================================================================================