-
Notifications
You must be signed in to change notification settings - Fork 60
feat: _createdAt
and _lastUpdatedAt
#2426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -75,6 +77,7 @@ export class RawCoMapView< | |||
this.id = core.id as CoID<this>; | |||
this.core = core; | |||
this.latestTxMadeAt = 0; | |||
this.earliestTxMadeAt = Number.MAX_SAFE_INTEGER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can read the creation date from the header (core.verified.header.createdAt)
This way we can get the value even if the CoMap is empty, and fallback to the max integer only of the comap is empty and the createdAt in the header is not set (should never happen, because the CoValues that have no createdAt in the header have always some content)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much! So, you're saying we can assume createdAt
will always be in the header, but if it isn't we can return Number.MAX_SAFE_INTEGER
?
Closes #2410.