Add PcdCommitments::is_empty()
This commit is contained in:
parent
d8f6915a4a
commit
786ea94623
@ -225,6 +225,10 @@ impl PcdCommitments {
|
|||||||
Self(BTreeMap::new())
|
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<()> {
|
pub fn update_with_value(&mut self, outpoint: &OutPoint, field: &str, new_value: &Value) -> Result<()> {
|
||||||
let serialized_outpoint = serialize(outpoint);
|
let serialized_outpoint = serialize(outpoint);
|
||||||
if let Some(old_hash) = self.get_mut(field) {
|
if let Some(old_hash) = self.get_mut(field) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user