stop method
Returns a Future that completes when the BlockStore has stopped and its state is saved.
Implementation
@override
/// Returns a [Future] that completes when the [BlockStore] has stopped and its state is saved.
Future<void> stop() async {
_logger.debug('Stopping BlockStore...');
try {
// Save pin state
final pinsFile = p.join(path, 'pins.json');
await _pinManager.save(pinsFile);
await _cleanup();
_logger.debug('BlockStore stopped successfully');
} catch (e, stackTrace) {
_logger.error('Failed to stop BlockStore', e, stackTrace);
rethrow;
}
}