You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(sync): inline make_default_block_processor as method (leanEthereum#731)
The factory existed only to capture `spec` in a closure for the
SyncService.process_block field. SyncService already has self.spec,
so the closure is unnecessary indirection. Inlines the body as
_default_process_block(self, store, block) and binds it as the
default in __post_init__.
The process_block field stays as a legitimate test-injection point.
Tests use it to substitute mock processors that exercise the
metrics and database-persistence wrapper without requiring a full
spec or state transition.
Net: -8 lines, zero behavior change, no test updates needed.
A reader of SyncService now finds the block-processing logic as a
method on the class instead of a module-level factory closure.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments