-
Notifications
You must be signed in to change notification settings - Fork 104
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
Allow initial RecordsWrite without data to be written to the DWN. #629
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #629 +/- ##
==========================================
- Coverage 98.57% 98.42% -0.15%
==========================================
Files 68 68
Lines 8417 8402 -15
Branches 1227 1227
==========================================
- Hits 8297 8270 -27
- Misses 114 124 +10
- Partials 6 8 +2 ☔ View full report in Codecov by Sentry. |
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.
Added some comments, and sent a PR to address some of the comments:
#635
…ePrunedInitialRecordsWrite method
597d40b
to
ab170bf
Compare
Love the refactor and comments, having the |
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.
👍 💯
There are some cases where a DWN might have an initial
RecordsWrite
message used to create a record, but not have the data associated with it.Until now this was only possible through a special method on the DWN
synchronizePrunedInitialRecordsWrite
which was only used for sync. However, there are multi-participant scenarios where this same behavior is necessary.This PR exposes that functionality to the general processing of
RecordsWrite
messages.If a
RecordsWrite
message is supplied without any data, it is checked that it is the initialRecordsWrite
and indexes it as not being the latest state, this prevents it from being queryable without any data until a subsequentRecordsWrite
with data is available.Addresses: #628