Add UTXO Snapshot Loading Interface and Progress Notifications
This PR implements a complete interface for loading UTXO snapshots through the GUI, including progress notifications to provide user feedback during the loading process.
Changes
Commit 1: interfaces: expose UTXO snapshot loading in node interface
- Added a new virtual method
loadSnapshot
to the node interface for loading UTXO snapshots. - Updated the implementation in
interfaces.cpp
to activate the snapshot using the provided file and metadata. - This change enhances the user’s ability to load UTXO snapshots through the GUI.
Commit 2: notifications: Implement snapshot load progress notifications
- Added a new signal
SnapshotLoadProgress
for snapshot load progress in the UI interface. - Updated the notifications interface to include a method for reporting snapshot loading progress.
- Enhanced the
ChainstateManager
to report progress during snapshot loading. - Implemented the necessary handler in the kernel notifications to relay progress updates.
- This change improves user feedback during the snapshot loading process.
Technical Details
The implementation includes:
-
UI Interface Enhancement Added
SnapshotLoadProgress
signal toCClientUIInterface
with corresponding signal declaration and implementation. -
Node Interface Added
loadSnapshot
virtual method to the node interface with implementation ininterfaces.cpp
. -
Progress Notifications Implemented
snapshotLoadProgress
method inKernelNotifications
class to relay progress updates to the UI. -
Base Interface Added
snapshotLoadProgress
virtual method to the kernel notifications interface.
Benefits
-
User Experience Provides real-time feedback during UTXO snapshot loading operations.
-
GUI Integration Enables loading UTXO snapshots directly through the Bitcoin Core GUI.
-
Progress Tracking Users can monitor the progress of snapshot loading operations.
-
Consistent Interface Follows the existing pattern for progress notifications in the codebase.