refactor: move LatestBlockInner into core to be able to expose subscribe in LatestBlockProvider trait#1405
refactor: move LatestBlockInner into core to be able to expose subscribe in LatestBlockProvider trait#1405taco-paco wants to merge 1 commit into
Conversation
…ibe method in LatestBlockProvider
📝 WalkthroughWalkthroughAdds a Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@magicblock-core/src/traits.rs`:
- Line 33: The new `subscribe` requirement on the public `LatestBlockProvider`
trait is a breaking API change for downstream implementors. Update the
`LatestBlockProvider` trait in `traits.rs` so `subscribe` has a default
implementation or is otherwise optional, and adjust any related implementations
of `subscribe`/`LatestBlockProvider` to preserve backward compatibility unless
you intend to version this as a breaking change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ec642033-d533-4d7f-969d-b0b463e752c9
📒 Files selected for processing (14)
magicblock-aperture/src/geyser.rsmagicblock-aperture/src/processor.rsmagicblock-aperture/src/state/blocks.rsmagicblock-core/Cargo.tomlmagicblock-core/src/link/blocks.rsmagicblock-core/src/traits.rsmagicblock-ledger/src/blockstore_processor/mod.rsmagicblock-ledger/src/lib.rsmagicblock-ledger/src/store/api.rsmagicblock-ledger/tests/get_block.rsmagicblock-ledger/tests/test_ledger_truncator.rsmagicblock-processor/src/executor/mod.rsmagicblock-processor/src/scheduler/mod.rstest-kit/src/lib.rs
…ibe method in LatestBlockProvider
Summary
Committor service needs an ability to implement SlotTimer, the easiest way is to implement using
broadcast::Receiver<Slot>return bysubscribeinLatestBlock.To expose this method in LatestBlockProvider trait we have to move LatestBlockInner in
magicblock-coreBreaking Changes
Test Plan
Summary by CodeRabbit
New Features
Refactor
Bug Fixes