From df2c1db6bd65c7c0139d09e7af48656e250ce84b Mon Sep 17 00:00:00 2001 From: Rahul Kothari Date: Wed, 7 Jun 2023 14:45:03 +0000 Subject: [PATCH] add is_empty() to nullifier_leaf --- .../stdlib/merkle_tree/nullifier_tree/nullifier_leaf.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/barretenberg/stdlib/merkle_tree/nullifier_tree/nullifier_leaf.hpp b/cpp/src/barretenberg/stdlib/merkle_tree/nullifier_tree/nullifier_leaf.hpp index d7080b48bb..5bcca73c3a 100644 --- a/cpp/src/barretenberg/stdlib/merkle_tree/nullifier_tree/nullifier_leaf.hpp +++ b/cpp/src/barretenberg/stdlib/merkle_tree/nullifier_tree/nullifier_leaf.hpp @@ -37,6 +37,7 @@ struct nullifier_leaf { write(buf, nextValue); } + bool is_empty() const { return value == fr::zero(); } barretenberg::fr hash() const { return stdlib::merkle_tree::hash_multiple_native({ value, nextIndex, nextValue }); } };