satisfy method

Future<bool> satisfy(
  1. String xx,
  2. Uint8List data,
  3. bool ghostMode
)

Implementation

Future<bool> satisfy(String xx, Uint8List data, bool ghostMode) async {
  if (xx == 0) {
    return false;
  }
  if (isXXcached(xx)) return false;
  //if (!_diskMissing.contains(xx)) return false;
  await pushXXbytes(xx, data, false);
  _xxStash[xx] = data;
  _xxWants.remove(xx);

  final cid = _xxCid[xx];
  if (cid != null) {
    await _io?.commitCid(data, cid);

    _diskMissing.remove(xx);
  }

  if (!ghostMode) {
    //todo map xx to cid
    //_io?.commitCid(data, xx);
  }
  return true;
}