setCached method

  1. @override
Future<void> setCached(
  1. int startBlock, {
  2. int? lastBlock,
})
override

Set flag to indicate that the cache block is available.

Implementation

@override
Future<void> setCached(int startBlock, {int? lastBlock}) async {
  lastBlock ??= startBlock;
  for (int i = startBlock; i <= lastBlock; i++) {
    _cacheState[i >> 3] |= 1 << (i & 7);
  }
  await _saveCacheState();
}