/// <summary> /// Increment the version for the node passed as argument. Returns a new VectorClock. /// </summary> /// <param name="node">Increment the vector clock value for a particular node.</param> /// <returns>An updated <see cref="VectorClock"/> instance.</returns> public VectorClock Increment(Node node) { var currentTimestamp = _versions.GetOrElse(node, Timestamp.Zero); return(new VectorClock(_versions.SetItem(node, currentTimestamp + 1))); }