reconcile static method
Reconciles a message received from the other side as the initiator.
Returns the response to send back plus the IDs discovered so far:
needIds are held by the other side only, haveIds by us only. A
response consisting of nothing but the version byte means the
reconciliation has converged.
Implementation
static (Uint8List response, List<String> needIds, List<String> haveIds)
reconcile(Uint8List message, List<NegentropyItem> items) {
final needIds = <String>[];
final haveIds = <String>[];
final response = _reconcileAux(
message,
items,
isInitiator: true,
needIds: needIds,
haveIds: haveIds,
);
return (response, needIds, haveIds);
}