Skip to content

Commit

Permalink
remove changes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPrimata committed Aug 27, 2024
1 parent 95ca13b commit 06cbab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions protocol-units/cryptography/tentacles/src/tests/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ fn reduce<'a>(kvs: &'a [(&[bool], [u8; 32])]) -> Vec<(&'a [bool], [u8; 32])> {
}

/// Returns the key immediately before `key` in `btree`.
fn prev_key<K>(btree: &BTreeMap<K>, key: &K) -> Option<K>
fn prev_key<K, V>(btree: &BTreeMap<K, V>, key: &K) -> Option<K>
where
K: Clone + Ord,
{
Expand All @@ -816,7 +816,7 @@ where
.map(|(k, _v)| k.clone())
}

fn next_key<K>(btree: &BTreeMap<K>, key: &K) -> Option<K>
fn next_key<K, V>(btree: &BTreeMap<K, V>, key: &K) -> Option<K>
where
K: Clone + Ord,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl<H: SimpleHasher> SparseMerkleProof<H> {
&self,
expected_root_hash: RootHash,
element_key: KeyHash,
element_value: Option,
element_value: Option<V>,
) -> Result<()> {
ensure!(
self.siblings.len() <= 256,
Expand Down Expand Up @@ -305,7 +305,7 @@ impl<H: SimpleHasher> SparseMerkleProof<H> {
self,
old_root_hash: RootHash,
new_element_key: KeyHash,
new_element_value: Option,
new_element_value: Option<V>,
) -> Result<RootHash> {
if let Some(new_element_value) = new_element_value {
// A value have been supplied, we need to prove that we inserted a given value at the new key
Expand Down Expand Up @@ -534,7 +534,7 @@ impl<H: SimpleHasher> UpdateMerkleProof<H> {
self,
old_root_hash: RootHash,
new_root_hash: RootHash,
updates: impl AsRef<[(KeyHash, Option)]>,
updates: impl AsRef<[(KeyHash, Option<V>)]>,
) -> Result<()> {
let updates = updates.as_ref();
ensure!(
Expand Down

0 comments on commit 06cbab3

Please sign in to comment.