Skip to content

Conversation

@yug49
Copy link
Contributor

@yug49 yug49 commented Dec 6, 2025

Resolves #226

This PR refactors the ReorgHandler struct into a trait-based design to enable better testability.

Changes

  • Added ReorgHandler trait - Defines the interface for chain reorganization detection with a single check method
  • Renamed ReorgHandler struct to DefaultReorgHandler - The concrete implementation using RPC providers now implements the new trait
  • Updated function signatures - All functions that accept a reorg handler now use generic bounds (R: ReorgHandler<N>) instead of the concrete type

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.

Introduce ReorgHandler Trait, Instead of Passing Struct Instance Around the Code

1 participant