refactor: extract key-wallet-manager crate from key-wallet#594
refactor: extract key-wallet-manager crate from key-wallet#594QuantumExplorer merged 2 commits intov0.42-devfrom
key-wallet-manager crate from key-wallet#594Conversation
Moves the manager module from `key-wallet` back into its own key-wallet-manager` crate.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughExtracted wallet-manager logic into a new crate Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.42-dev #594 +/- ##
=============================================
- Coverage 67.40% 67.21% -0.20%
=============================================
Files 318 318
Lines 67020 67018 -2
=============================================
- Hits 45175 45046 -129
- Misses 21845 21972 +127
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
dash-spv-ffi/Cargo.toml (1)
35-39:⚠️ Potential issue | 🔴 Critical
key-wallet-managermust be included with thebincodefeature to support tests.The test at
dash-spv-ffi/tests/test_wallet_manager.rs:79callscreate_wallet_from_mnemonic_return_serialized_bytes, which is gated behind#[cfg(feature = "bincode")]inkey-wallet-manager. Sincebincodeis not a default feature inkey-wallet-manager/Cargo.tomland the current dependency declaration indash-spv-ffi/Cargo.toml:31omits thebincodefeature, the method will not be compiled and the test will fail.Add the
bincodefeature to thekey-wallet-managerdependency:key-wallet-manager = { path = "../key-wallet-manager", features = ["bincode"] }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dash-spv-ffi/Cargo.toml` around lines 35 - 39, The dependency declaration for key-wallet-manager in dash-spv-ffi's Cargo.toml is missing the bincode feature so the test calling create_wallet_from_mnemonic_return_serialized_bytes (which is gated by #[cfg(feature = "bincode")]) won't be compiled; update the dev-dependencies entry for key-wallet-manager to include the bincode feature (i.e., change the dependency declaration for key-wallet-manager to specify features = ["bincode"]) so the bincode-gated functions are available to tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@dash-spv-ffi/Cargo.toml`:
- Around line 35-39: The dependency declaration for key-wallet-manager in
dash-spv-ffi's Cargo.toml is missing the bincode feature so the test calling
create_wallet_from_mnemonic_return_serialized_bytes (which is gated by
#[cfg(feature = "bincode")]) won't be compiled; update the dev-dependencies
entry for key-wallet-manager to include the bincode feature (i.e., change the
dependency declaration for key-wallet-manager to specify features = ["bincode"])
so the bincode-gated functions are available to tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 15af4040-0d81-4e33-9af9-2709af3c912d
📒 Files selected for processing (63)
.codecov.yml.github/ci-groups.ymlCargo.tomldash-spv-ffi/Cargo.tomldash-spv-ffi/src/callbacks.rsdash-spv-ffi/src/client.rsdash-spv-ffi/tests/test_wallet_manager.rsdash-spv/Cargo.tomldash-spv/examples/filter_sync.rsdash-spv/examples/simple_sync.rsdash-spv/examples/spv_with_wallet.rsdash-spv/src/client/core.rsdash-spv/src/client/event_handler.rsdash-spv/src/client/events.rsdash-spv/src/client/lifecycle.rsdash-spv/src/client/mempool.rsdash-spv/src/client/mod.rsdash-spv/src/client/queries.rsdash-spv/src/client/sync_coordinator.rsdash-spv/src/client/transactions.rsdash-spv/src/lib.rsdash-spv/src/main.rsdash-spv/src/sync/blocks/manager.rsdash-spv/src/sync/blocks/pipeline.rsdash-spv/src/sync/blocks/sync_manager.rsdash-spv/src/sync/events.rsdash-spv/src/sync/filters/batch.rsdash-spv/src/sync/filters/batch_tracker.rsdash-spv/src/sync/filters/manager.rsdash-spv/src/sync/filters/pipeline.rsdash-spv/src/sync/filters/sync_manager.rsdash-spv/src/sync/mempool/manager.rsdash-spv/src/sync/mempool/sync_manager.rsdash-spv/src/sync/sync_coordinator.rsdash-spv/src/test_utils/event_handler.rsdash-spv/src/validation/filter.rsdash-spv/tests/dashd_sync/helpers.rsdash-spv/tests/dashd_sync/setup.rsdash-spv/tests/dashd_sync/tests_basic.rsdash-spv/tests/peer_test.rsdash-spv/tests/wallet_integration_test.rskey-wallet-ffi/Cargo.tomlkey-wallet-ffi/src/error.rskey-wallet-ffi/src/wallet_manager.rskey-wallet-ffi/src/wallet_manager_tests.rskey-wallet-ffi/tests/test_error_conversions.rskey-wallet-manager/Cargo.tomlkey-wallet-manager/examples/wallet_creation.rskey-wallet-manager/src/event_tests.rskey-wallet-manager/src/events.rskey-wallet-manager/src/lib.rskey-wallet-manager/src/matching.rskey-wallet-manager/src/process_block.rskey-wallet-manager/src/test_helpers.rskey-wallet-manager/src/test_utils/mock_wallet.rskey-wallet-manager/src/test_utils/mod.rskey-wallet-manager/src/wallet_interface.rskey-wallet-manager/tests/integration_test.rskey-wallet-manager/tests/spv_integration_tests.rskey-wallet-manager/tests/test_serialized_wallets.rskey-wallet/Cargo.tomlkey-wallet/src/lib.rskey-wallet/src/test_utils/mod.rs
💤 Files with no reviewable changes (2)
- key-wallet/src/lib.rs
- key-wallet/src/test_utils/mod.rs
Follow-up to #594. Improves the key-wallet-manager crate structure: - Extract WalletManager accessor methods into accessors.rs (wallet creation, import, removal, lookup — ~213 lines) - Extract WalletError into error.rs (~99 lines) - Slim lib.rs to core struct definition and field management - Move examples and integration tests from key-wallet-manager to key-wallet (they test wallet primitives, not the manager) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reverts the manager module from
key-walletback into its own key-wallet-manager` crate like it was before.This also reverts the
parallel-filterfeature which was added along the way when there were issues in platform after the merge of the crates.Summary by CodeRabbit
Refactor
Chores