From 74c9461b25f1125b6384df8a3e3a142ce31c1d68 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 5 Sep 2023 18:16:11 +0200 Subject: [PATCH] fix(cognitarium): decrease the store byte size upon deletion Co-authored-by: Arnaud Mimart <33665250+amimart@users.noreply.github.com> --- contracts/okp4-cognitarium/src/storer/engine.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/okp4-cognitarium/src/storer/engine.rs b/contracts/okp4-cognitarium/src/storer/engine.rs index 1f1a5066..6b4f9dc7 100644 --- a/contracts/okp4-cognitarium/src/storer/engine.rs +++ b/contracts/okp4-cognitarium/src/storer/engine.rs @@ -103,6 +103,7 @@ impl<'a> StoreEngine<'a> { let object_hash: Hash = triple.object.as_hash(); self.store.stat.triple_count -= Uint128::one(); + self.store.stat.byte_size -= Uint128::from(Self::triple_size(t) as u128); triples() .remove( self.storage,