syncRandom method

Future<void> syncRandom()

Performs a sync with a randomly selected online device.

Implementation

Future<void> syncRandom() async {
  final onlineDevices = await db.devices.online.get();
  if (onlineDevices.isEmpty) {
    _logger.log('No peers online');
    return;
  }

  await syncDevice(onlineDevices.sample().signingKey);
}