tangled
alpha
login
or
join now
angrydutchman.peedee.es
/
plcbundle
forked from
atscan.net/plcbundle
0
fork
atom
A Transparent and Verifiable Way to Sync the AT Protocol's PLC Directory
0
fork
atom
overview
issues
pulls
pipelines
did count in mempool stats
tree.fail
4 months ago
efa2d2a0
f53c0927
+4
-1
1 changed file
expand all
collapse all
unified
split
bundle
mempool.go
+4
-1
bundle/mempool.go
···
383
383
stats["first_time"] = m.operations[0].CreatedAt
384
384
stats["last_time"] = m.operations[len(m.operations)-1].CreatedAt
385
385
386
386
-
// Calculate size
386
386
+
// Calculate size and unique DIDs
387
387
totalSize := 0
388
388
+
didSet := make(map[string]bool)
388
389
for _, op := range m.operations {
389
390
totalSize += len(op.RawJSON)
391
391
+
didSet[op.DID] = true
390
392
}
391
393
stats["size_bytes"] = totalSize
394
394
+
stats["did_count"] = len(didSet) // ← ADDED
392
395
}
393
396
394
397
return stats