Closed MaddieM4 closed 10 years ago
First of all, need to implement a "bandaid" TimestampService that holds a *Document, and returns doc.Timestamps. At that point, we can implement the tracker logic.
This implementation will actually completely recalculate everything during GoToLatest(). So there's no need to worry about the timestamp order changing between runs.
Still got a few functions that need testing, still going from dependencies to dependents. Which means we have this much left to go before merge:
Object takes a Document and a TimestampService, and traverses the Document to the latest event in the valid, timestamped chain when you run .GoToLatest().
Tracks the set of known-valid timestamps, such that all newly-validating timestamps must be on, or compatible with, that set. Can come to weird conclusions if the TimestampService returns inconsistent results between runs (new elements on the end are expected, new elements interspersed throughout would theoretically be fine, complete reorders are wackadoo).