diff --git a/src/pcd.rs b/src/pcd.rs index 18eb3ec..df4bd53 100644 --- a/src/pcd.rs +++ b/src/pcd.rs @@ -225,6 +225,10 @@ impl PcdCommitments { Self(BTreeMap::new()) } + pub fn is_empty(&self) -> bool { + self.0.is_empty() + } + pub fn update_with_value(&mut self, outpoint: &OutPoint, field: &str, new_value: &Value) -> Result<()> { let serialized_outpoint = serialize(outpoint); if let Some(old_hash) = self.get_mut(field) {