From 242a05869818d848575434f68c09380b4491be2a Mon Sep 17 00:00:00 2001 From: Rafael Cardenas Date: Fri, 5 Jul 2024 10:42:21 -0600 Subject: [PATCH] fix: increase activity count when etching --- src/db/cache/index_cache.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/db/cache/index_cache.rs b/src/db/cache/index_cache.rs index 2dabd18..2e50dfa 100644 --- a/src/db/cache/index_cache.rs +++ b/src/db/cache/index_cache.rs @@ -351,7 +351,18 @@ impl IndexCache { self.db_cache.ledger_entries.extend(entries.clone()); for entry in entries.iter() { match entry.operation { - DbLedgerOperation::Etching => {} + DbLedgerOperation::Etching => { + self.db_cache + .supply_changes + .entry(entry.rune_id.clone()) + .and_modify(|i| { + i.total_operations += 1; + }) + .or_insert(DbSupplyChange::from_operation( + entry.rune_id.clone(), + entry.block_height.clone(), + )); + } DbLedgerOperation::Mint => { self.db_cache .supply_changes