perf: remove dead relayTimes field - #1931
Merged
Merged
Conversation
The relayTimes field (map[string][]int64) on PacketStore is never written to and never read. Its only references are the declaration and the make() in NewPacketStore. relay_liveness_test.go builds its own local idx map and passes that to addTxToRelayTimeIndex; the string 'relayTimes' there is only inside a t.Error message. Rebased to master after Kpa-clawbot#1855 merged and removed lastSeenTouched, which made the original PR Kpa-clawbot#1872 no longer compile. This is the only remaining valid change from that PR.
efiten
enabled auto-merge (squash)
September 2, 2026 12:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
relayTimesfield (map[string][]int64) onPacketStoreis never written to and never read. Its only references are the declaration atstore.go:180and themake()inNewPacketStoreatstore.go:644.relay_liveness_test.golooks like a user at a glance but builds its own localidx := make(map[string][]int64)and passes that toaddTxToRelayTimeIndex; the string "relayTimes" there is only inside at.Errormessage.This is the surviving fragment of #1872, which no longer compiles after #1855 removed
lastSeenTouchedandtouchRelayLastSeenfrom master. Verified against current master: both references are gone, build passes, all tests pass (32.2s).