Skip to content

Commit

Permalink
recalculate zktrie node hash
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Sep 9, 2024
1 parent 4a91915 commit 710264a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use alloy::{
};
use std::fmt::Debug;
use std::sync::Once;
use zktrie::ZkMemoryDb;
use zktrie::{ZkMemoryDb, ZkTrieNode};

/// Predeployed contracts
pub mod predeployed;
Expand Down Expand Up @@ -87,8 +87,8 @@ pub trait Block: Debug {
/// Update zktrie state from trace
#[inline]
fn build_zktrie_db(&self, zktrie_db: &mut ZkMemoryDb) {
for (k, bytes) in self.flatten_proofs() {
zktrie_db.add_node_bytes(bytes, Some(k.as_slice())).unwrap();
for (_, bytes) in self.flatten_proofs() {
zktrie_db.add_node_bytes(bytes, None).unwrap();
}
}

Expand Down

0 comments on commit 710264a

Please sign in to comment.