Skip to content

Commit

Permalink
Removed unnecessary print lines
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Mar 22, 2024
1 parent d9070ea commit 5c1fbaf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
18 changes: 0 additions & 18 deletions contracts/sumtree-orderbook/src/sumtree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,6 @@ impl TreeNode {
new_node.parent = Some(self.key);
new_node.save(storage)?;
self.save(storage)?;
#[cfg(test)]
println!("Inserted {} left on {}", new_node, self);
self.rebalance(storage)?;
return Ok(());
}
Expand All @@ -387,8 +385,6 @@ impl TreeNode {
new_node.parent = Some(self.key);
new_node.save(storage)?;
self.save(storage)?;
#[cfg(test)]
println!("Inserted {} right on {}", new_node, self);
self.rebalance(storage)?;
return Ok(());
}
Expand All @@ -399,8 +395,6 @@ impl TreeNode {
new_node.parent = Some(self.key);
new_node.save(storage)?;
self.save(storage)?;
#[cfg(test)]
println!("Inserted {} right on {}", new_node, self);
self.rebalance(storage)?;
return Ok(());
}
Expand All @@ -419,11 +413,6 @@ impl TreeNode {
let new_left = left.split(storage, new_node)?;
self.left = Some(new_left);
self.save(storage)?;
#[cfg(test)]
println!(
"Split {} left on {} generating {}",
new_node, self, new_left
);
self.rebalance(storage)?;
return Ok(());
}
Expand All @@ -436,8 +425,6 @@ impl TreeNode {
new_node.parent = Some(self.key);
new_node.save(storage)?;
self.save(storage)?;
#[cfg(test)]
println!("Inserted {} right on {} after reordering", new_node, self);
self.rebalance(storage)?;
return Ok(());
}
Expand All @@ -448,11 +435,6 @@ impl TreeNode {
let new_right = right.split(storage, new_node)?;
self.right = Some(new_right);
self.save(storage)?;
#[cfg(test)]
println!(
"Split {} right on {} generating {}",
new_node, self, new_right
);
self.rebalance(storage)?;
return Ok(());
}
Expand Down
4 changes: 0 additions & 4 deletions contracts/sumtree-orderbook/src/sumtree/test/test_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,7 @@ fn test_tree_rebalancing() {
NodeType::leaf(6u32, 1u32),
NodeType::leaf(3u32, 1u32),
NodeType::leaf(5u32, 1u32),
NodeType::leaf(20u32, 1u32),
NodeType::leaf(13u32, 1u32),
NodeType::leaf(4u32, 1u32),
NodeType::leaf(7u32, 1u32),
],
print: true,
},
Expand All @@ -511,7 +508,6 @@ fn test_tree_rebalancing() {
NodeType::leaf(3u32, 1u32),
NodeType::leaf(2u32, 1u32),
NodeType::leaf(4u32, 1u32),
NodeType::leaf(12u32, 1u32),
],
print: true,
},
Expand Down

0 comments on commit 5c1fbaf

Please sign in to comment.