Skip to content

chore(model): remove unused newChannelId2channel variable#2391

Open
hobostay wants to merge 1 commit into
songquanpeng:mainfrom
hobostay:fix/unused-cache-variable
Open

chore(model): remove unused newChannelId2channel variable#2391
hobostay wants to merge 1 commit into
songquanpeng:mainfrom
hobostay:fix/unused-cache-variable

Conversation

@hobostay

Copy link
Copy Markdown

Summary

  • Remove the unused newChannelId2channel variable from InitChannelCache() in model/cache.go.

Why

The variable is declared at line 174, populated in the loop at line 178, but never read anywhere. It is dead code that wastes memory by building a map that is immediately discarded.

Related: #2321

Test plan

  • Verify go vet ./model/ passes
  • Verify channel cache sync still works correctly

🤖 Generated with Claude Code

The variable newChannelId2channel in InitChannelCache() is declared
and populated but never read. Remove the dead code.

Related: songquanpeng#2321

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant