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(spv): unify blockchain height handling in storage and sync layers (#153)
* refactor(spv): unify blockchain height handling in storage and sync layers
- Updated storage and sync components to treat heights as blockchain heights instead of storage indices, simplifying the API and improving clarity.
- Refactored methods in `StorageManager` to accept blockchain heights directly, eliminating the need for manual conversions.
- Adjusted header retrieval and loading logic across various modules to align with the new height handling, enhancing consistency and reducing potential errors.
- Improved logging to reflect the changes in height handling, providing clearer insights during synchronization processes.
* fix(spv): process tip-announced blocks through header+filter flow and request full blocks for privacy
* fix(spv/storage): return None for heights below sync_base_height when base > 0 in MemoryStorageManager::get_header\n\nPrevents incorrect header lookup by avoiding implicit storage-index interpretation for absolute heights below the checkpoint base; aligns in-memory behavior with absolute height semantics.
* refactor(spv): always process full blocks after routing header; remove ad-hoc local cfilter gating
* fix(spv/storage): skip processing for heights below base in MemoryStorageManager::get_header
Updated the logic in MemoryStorageManager::get_header to skip heights below the base when base > 0, preventing unnecessary iterations and aligning behavior with expected height semantics.
* fix(spv): clone block header when creating headers message in message_handler
Updated the message_handler to clone the block header when constructing the headers message. This change ensures that the original block header remains intact and avoids potential issues with ownership and borrowing in the processing flow.
* fix
* fix
* Update dash-spv/src/storage/memory.rs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix
* fix
---------
Co-authored-by: Quantum Explorer <quantum@dash.org>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
0 commit comments