Skip to content

Commit

Permalink
add tree counter
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas089 committed Mar 25, 2024
1 parent e477eaa commit 60e1815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub struct Node {
pub address: String,
pub port: u16,
pub counter_uref: String,
pub tree_counter_uref: String,
pub dict_uref: String,
pub secret_key_path: String,
pub chain_name: String,
Expand Down Expand Up @@ -128,6 +129,7 @@ impl Config {
address: "127.0.0.1".to_string(),
port: 11101,
counter_uref: "uref-".to_string(),
tree_counter_uref: "uref-".to_string(),
dict_uref: "uref-".to_string(),
secret_key_path: "/".to_string(),
chain_name: "cspr-dev-cctl".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion node/src/handlers/delta_tree/submit_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub async fn submit_batch(State(AppState): State<AppState>) -> impl IntoResponse
let deposits: Vec<Deposit> = unprocessed_deposits.into_iter().map(|model| model.into()).collect();

// this counter uref is different!
let tree_index = query::query_counter(&CONFIG.node_address(), &CONFIG.node.port.to_string(), &CONFIG.node.counter_uref).await;
let tree_index = query::query_counter(&CONFIG.node_address(), &CONFIG.node.port.to_string(), &CONFIG.node.tree_counter_uref).await;
let mut previous_tree: KairosDeltaTree = KairosDeltaTree{
zero_node: hash_bytes(vec![0;32]),
zero_levels: Vec::new(),
Expand Down

0 comments on commit 60e1815

Please sign in to comment.