mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-10-30 06:02:23 +00:00
perf: remove dead relayTimes field (#1931)
The `relayTimes` field (`map[string][]int64`) on `PacketStore` is never written to and never read. Its only references are the declaration at `store.go:180` and the `make()` in `NewPacketStore` at `store.go:644`. `relay_liveness_test.go` looks like a user at a glance but builds its own local `idx := make(map[string][]int64)` and passes that to `addTxToRelayTimeIndex`; the string "relayTimes" there is only inside a `t.Error` message. This is the surviving fragment of #1872, which no longer compiles after #1855 removed `lastSeenTouched` and `touchRelayLastSeen` from master. Verified against current master: both references are gone, build passes, all tests pass (32.2s). Co-authored-by: Joel Claw <358739783+Joel-Claw@users.noreply.github.com>
This commit is contained in:
1 parent
a46a6d55eb
commit
4a776454ca
1 file changed
-2
@@ -177,7 +177,6 @@ type PacketStore struct {
|
||||
byNode map[string][]*StoreTx // pubkey → transmissions
|
||||
nodeHashes map[string]map[string]bool // pubkey → Set<hash>
|
||||
byPathHop map[string][]*StoreTx // lowercase hop/pubkey → transmissions with that hop in path
|
||||
relayTimes map[string][]int64 // lowercase pubkey → sorted unix-millis of relay events (full pubkeys only)
|
||||
byPayloadType map[int][]*StoreTx // payload_type → transmissions
|
||||
loaded bool
|
||||
totalObs int
|
||||
@@ -641,7 +640,6 @@ func NewPacketStore(db *DB, cfg *PacketStoreConfig, cacheTTLs ...map[string]inte
|
||||
byObserver: make(map[string][]*StoreObs),
|
||||
byNode: make(map[string][]*StoreTx),
|
||||
byPathHop: make(map[string][]*StoreTx),
|
||||
relayTimes: make(map[string][]int64),
|
||||
nodeHashes: make(map[string]map[string]bool),
|
||||
byPayloadType: make(map[int][]*StoreTx),
|
||||
rfCache: make(map[string]*cachedResult),
|
||||
|
||||
Reference in new issue
Block a user