feat: add from_elements to NodeIndex

This commit is contained in:
Victor Lopez
2023-02-16 21:14:07 +01:00
parent 3af53e63cf
commit 9307178873
4 changed files with 20 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
use super::{
hash::rpo::{Rpo256, RpoDigest},
utils::collections::{vec, BTreeMap, Vec},
Felt, Word, ZERO,
Felt, StarkField, Word, ZERO,
};
use core::fmt;
@@ -26,7 +26,7 @@ pub use simple_smt::SimpleSmt;
#[derive(Clone, Debug)]
pub enum MerkleError {
DepthTooSmall(u8),
DepthTooBig(u8),
DepthTooBig(u64),
NumLeavesNotPowerOfTwo(usize),
InvalidIndex(NodeIndex),
InvalidDepth { expected: u8, provided: u8 },