refactor: additional unused code cleanup#10445
Merged
smartprogrammer93 merged 3 commits intorefactoring/unused-codefrom Feb 7, 2026
Merged
refactor: additional unused code cleanup#10445smartprogrammer93 merged 3 commits intorefactoring/unused-codefrom
smartprogrammer93 merged 3 commits intorefactoring/unused-codefrom
Conversation
- Delete 5 empty (0-byte) files in TxPool and Consensus - Remove 7 unused private methods: - TrieStore.IsStillNeeded() - PatriciaTree.ThrowInvalidDataException/ThrowMissingChildException/ThrowMissingPrefixException - EthereumRunner.Stop() - EthereumL1Bridge.LogReorg() - Ssz.DecodeDynamicOffset() (moved VarOffsetSize to BasicTypes.cs) - Remove 7 unused private/static fields: - TrieNode._nodeDecoder - PatriciaTree._singleByteKeys - PersistentStorageProvider._loadFromTreeStorageFunc - SmallTrieVisitContext._branchChildIndex - TdxsClient._logger - InitializeBlockchain._logManager - SyncProgressResolver._logger - Remove 6 dead NDM/LES timeout constants from Timeouts.cs - Remove 11 unused/duplicate ErrorCodes constants - Remove 3 unused L1 epoch constants from EthereumL1Bridge - Clean up unused using directives (System.IO, System)
Removes unused ILogManager parameter that was causing CI build failure. The parameter was not used anywhere in the class after previous cleanup. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Delete 15 unreferenced type files identified through codebase-wide static analysis: Synchronization (5): - AllocationChangeEventArgs - StaticStrategy, NullStrategy, ClientTypeStrategy - StrategySelectionType enum Core (5): - CompositePublisher, SortedRealList, ConcurrentWriteBatcher - CappedArrayMemoryManager, ISpanCache Serialization/Network/RPC (5): - LogPublisher, CountingTextWriter, CountingTextReader - IDiscoveryMsgSerializersProvider, IJsonRpcResult Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactoring/unused-code #10445 +/- ##
============================================================
- Coverage 57.42% 0 -57.43%
============================================================
Files 2818 0 -2818
Lines 132494 0 -132494
Branches 19921 0 -19921
============================================================
- Hits 76082 0 -76082
+ Misses 51335 0 -51335
+ Partials 5077 0 -5077 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Additional Unused Code Cleanup
Building on top of #10440, this PR removes more unused code found via automated analysis across the full codebase.
Changes
5 empty (0-byte) files deleted:
TxNonceTxPoolReserveSealer.cs,TxPool.NonceInfo.cs(TxPool)OverridableTxProcessingScope.cs,IOverridableTxProcessorSource.cs,IOverridableTxProcessingScope.cs(Consensus)7 unused private methods removed:
TrieStore.IsStillNeeded()— dead wrapperPatriciaTree.ThrowInvalidDataException/ThrowMissingChildException/ThrowMissingPrefixException— unused throw helpersEthereumRunner.Stop()— replaced by ServiceStopper patternEthereumL1Bridge.LogReorg()— never calledSsz.DecodeDynamicOffset()— never called (movedVarOffsetSizeto BasicTypes.cs)7 unused fields removed:
TrieNode._nodeDecoder— static instance, all calls use static methodsPatriciaTree._singleByteKeys— unused byte arrayPersistentStorageProvider._loadFromTreeStorageFunc— delegate never invokedSmallTrieVisitContext._branchChildIndex— no accessor, never readTdxsClient._logger— assigned but never readInitializeBlockchain._logManager— assigned but never referencedSyncProgressResolver._logger— assigned but never read6 dead NDM/LES timeout constants removed from
Timeouts.cs(NDM and LES protocols were removed long ago)11 unused/duplicate ErrorCodes constants removed
3 dead L1 epoch constants removed from
EthereumL1BridgeUnused
usingdirectives cleaned up where removal of dead code made them unnecessary