Skip to content

Commit

Permalink
fix: patricia should be 251
Browse files Browse the repository at this point in the history
  • Loading branch information
nimrod-starkware committed Jun 9, 2024
1 parent 5acf423 commit 5a5f293
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::patricia_merkle_tree::node_data::leaf::{ContractState, LeafDataImpl};
use crate::patricia_merkle_tree::types::SubTreeHeight;
use crate::storage::db_object::DBObject;
use crate::storage::storage_trait::{StoragePrefix, StorageValue};

Expand All @@ -23,11 +24,11 @@ impl DBObject for LeafDataImpl {
storage_root_hash,
nonce,
}) => {
// TODO(Aviv, 8/5/2024): Use height from the input.
let json_string = format!(
r#"{{"contract_hash": "{}", "storage_commitment_tree": {{"root": "{}", "height": 252}}, "nonce": "{}"}}"#,
r#"{{"contract_hash": "{}", "storage_commitment_tree": {{"root": "{}", "height": {}}}, "nonce": "{}"}}"#,
class_hash.0.to_fixed_hex_string(),
storage_root_hash.0.to_fixed_hex_string(),
SubTreeHeight::ACTUAL_HEIGHT,
nonce.0.to_hex(),
);
StorageValue(json_string.into_bytes())
Expand Down

0 comments on commit 5a5f293

Please sign in to comment.