-
Notifications
You must be signed in to change notification settings - Fork 4
Commit 194410a
refactor: simplify the code, fix various test compilation issues (#98)
* refactor(swift-dash-core-sdk): suppress cargo build output on success
Only display cargo build logs when builds fail, showing clean checkmarks
for successful builds. This makes the build output more concise and easier
to read while still providing full diagnostics on failure.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove vestigial terminal block infrastructure from dash-spv
This commit removes the obsolete terminal block system that was previously
used for sync optimization but has been superseded by sequential sync.
Changes:
- Remove all terminal block storage methods from StorageManager trait
- Remove StoredTerminalBlock type and related data structures
- Delete terminal block data files (mainnet/testnet JSON files)
- Remove terminal block sync modules and managers
- Clean up backup files (.backup, _old.rs)
- Remove unused terminal block tests and examples
- Remove terminal block documentation
The dash-spv binary continues to work correctly, reaching sync height
of 1306349+ on testnet as verified by testing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore(dash-spv): remove obsolete test examples
Removed 5 obsolete example files that were using old sync patterns:
- test_headers2.rs and test_headers2_fix.rs (superseded by sequential sync)
- test_genesis.rs, test_header_count.rs, test_initial_sync.rs (test utilities)
Baseline sync verified: Headers: 1306354
🤖 Generated with Claude Code: https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
* chore(dash-spv): remove dead code and clean up comments
- Removed interleaved sync reference in sequential/mod.rs comment
- Removed DKG window reference in sequential/mod.rs comment
- Removed unused SAVE_INTERVAL_SECS constant in storage/disk.rs
- Removed #[allow(dead_code)] from process_header_with_fork_detection (method is used)
- Removed unused extract_address_from_script method in transaction_processor.rs
Baseline sync verified: Headers: 1306356
🤖 Generated with Claude Code: https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): partial test compilation fixes
Fixed several test compilation issues:
- Fixed create_mock_mn_list_diff reference in validation_test.rs
- Replaced ValidationMode::CheckpointsOnly with ValidationMode::Basic
- Fixed ClientConfig builder pattern (removed with_max_peers)
- Fixed WatchItem::Address structure (removed label field)
Note: 227 test compilation errors remain due to API changes.
These will require more extensive refactoring in a future commit.
Main code still compiles and baseline sync verified: Headers: 1306357
🤖 Generated with Claude Code: https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
* chore(dash-spv): remove obsolete test examples
Removed 3 obsolete headers2 test files that are no longer relevant:
- headers2_test.rs
- headers2_protocol_test.rs
- headers2_transition_test.rs
These tests were for the old headers2 implementation which has been superseded.
Baseline sync verified: Headers: 1306358
🤖 Generated with Claude Code: https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
* chore(dash-spv): remove more vestigial test code
- Removed phase2_integration_test.rs and phase3_integration_test.rs
These tests were for deleted features (parallel, recovery, scheduler, batching)
- Fixed some import paths in chainlock_validation_test.rs
- Updated DashSpvClient::new() calls to use single-argument API
Progress: Reduced test errors from 227 to 212
Main code still compiles and baseline sync verified: Headers: 1306365
🤖 Generated with Claude Code: https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): partial test compilation fixes
Phase 1 completed: Fixed simple test errors
- error_types_test: Fixed borrow checker issue
- qrinfo_integration_test: Removed references to deleted config fields
- block_download_test: Fixed Result unwrapping
Phase 2 progress: Partial lib test fixes
- Fixed Wallet::new() to include storage parameter
- Made create_mock_mn_list_diff public
- Reduced lib test errors from 88 to 84
Tests now compiling: 24 of 28 integration tests pass
Remaining work: 3 complex integration tests + remaining lib tests
🤖 Generated with Claude Code: https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): major progress on test compilation fixes
Phase 1 Completed: Fixed MockNetworkManager
- Implemented all required NetworkManager trait methods
- Fixed return types (Option<NetworkMessage>, NetworkResult)
- Added missing methods: as_any, peer_count, peer_info, send_ping, handle_ping, etc.
- Fixed ServiceFlags import path to dashcore::network::constants::ServiceFlags
Phase 2 Progress: Fixed many struct field issues
- Updated PeerInfo construction with correct fields
- Fixed DiskStorageManager::new to use await (async)
- Replaced UInt256 references with BlockHash::all_zeros()
- Fixed Wallet::new() to include storage parameter
Current Status:
- 24 of 28 integration tests now compile (was 21)
- chainlock_validation_test reduced from 47 to 22 errors
- Lib test errors reduced from 88 to ~84
Remaining work: Complete struct fixes, StorageManager implementations, and remaining API updates
🤖 Generated with Claude Code: https://claude.ai/code
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: resolve various test failures
* remove dash-spv-data
* rm test checkpoint data
* fix(dash-spv): use temporary directory by default instead of ./dash-spv-data
Changes the default data directory behavior to create unique temporary
directories in /tmp rather than using ./dash-spv-data in the project
directory. This prevents cluttering the workspace and aligns with test
behavior.
- Default: Creates /tmp/dash-spv-{timestamp}-{pid} directory
- Explicit: --data-dir flag still works for custom paths
- Tests: Already use TempDir and are unaffected
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): remove obsolete StoredTerminalBlock references from tests
The StoredTerminalBlock type and related methods (store_terminal_block,
get_terminal_block, clear_terminal_block) were removed from the
StorageManager trait but references remained in test mock implementations.
- Removed terminal block method implementations from MockStorageManager
in error_handling_test.rs and error_recovery_integration_test.rs
- These methods are no longer part of the StorageManager trait
Note: These test files still have other compilation issues with their
mock implementations that need separate fixes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* test(dash-spv): improve error message for SyncManager creation failure
Replace unwrap() with expect() in block_download_test.rs to provide
clearer error messages when test setup fails. This makes test failures
more actionable by showing what specifically failed during initialization.
- Changed SyncManager::new().unwrap() to use .expect() with descriptive message
- Test verified: all 9 tests in block_download_test pass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): remove deprecated ClientConfig fields from tests
Remove the deprecated enable_qr_info and qr_info_fallback fields from
network/tests.rs to match the updated ClientConfig structure. These
fields are no longer part of the configuration API.
- Removed enable_qr_info and qr_info_fallback fields from test config
- Kept qr_info_extra_share and qr_info_timeout which are still valid
- Tests compile successfully with the updated config
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: remove obsolete planning documents
Remove QRInfo and Phase 3 planning documents that are no longer needed
as the implementation has been completed.
- Removed PLAN_QRINFO.md
- Removed PHASE_3_IMPLEMENTATION.md
- Removed PLAN_QRINFO_2.md
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: remove obsolete documentation files from dash-spv
Remove temporary documentation files that were created during the
QRInfo implementation and code removal process. These files served
their purpose during development and are no longer needed.
- Removed QRINFO_COMPLETION_SUMMARY.md
- Removed QRINFO_FINAL_STATUS.md
- Removed QRINFO_IMPLEMENTATION_STATUS.md
- Removed QRINFO_INTEGRATION_COMPLETE.md
- Removed REMOVAL_EXECUTION_SUMMARY.md
- Removed REMOVAL_PLAN.md
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: quantum <quantum@pastas-Mac-Studio.local>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: dcg <dcg@dcgs-Mac-Studio.local>1 parent 699dc86 commit 194410aCopy full SHA for 194410a
File tree
Expand file treeCollapse file tree
48 files changed
+267
-39335
lines changedOpen diff view settings
Filter options
- dash-spv
- data
- mainnet
- testnet
- docs
- examples
- scripts
- src
- client
- network
- storage
- sync
- sequential
- terminal_block_data
- wallet
- tests
- swift-dash-core-sdk
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Expand file treeCollapse file tree
48 files changed
+267
-39335
lines changedOpen diff view settings
Collapse file
dash-spv/QRINFO_INTEGRATION_COMPLETE.md
Copy file name to clipboardExpand all lines: dash-spv/QRINFO_INTEGRATION_COMPLETE.md-126Lines changed: 0 additions & 126 deletions
This file was deleted.
Collapse file
dash-spv/data/mainnet/mod.rs
Copy file name to clipboardExpand all lines: dash-spv/data/mainnet/mod.rs-87Lines changed: 0 additions & 87 deletions
This file was deleted.
0 commit comments