Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit e797fc3

Browse files
authored
fix: increase activity count when etching (#14)
1 parent 98f56bd commit e797fc3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/db/cache/index_cache.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,18 @@ impl IndexCache {
351351
self.db_cache.ledger_entries.extend(entries.clone());
352352
for entry in entries.iter() {
353353
match entry.operation {
354-
DbLedgerOperation::Etching => {}
354+
DbLedgerOperation::Etching => {
355+
self.db_cache
356+
.supply_changes
357+
.entry(entry.rune_id.clone())
358+
.and_modify(|i| {
359+
i.total_operations += 1;
360+
})
361+
.or_insert(DbSupplyChange::from_operation(
362+
entry.rune_id.clone(),
363+
entry.block_height.clone(),
364+
));
365+
}
355366
DbLedgerOperation::Mint => {
356367
self.db_cache
357368
.supply_changes

0 commit comments

Comments
 (0)