aboutsummaryrefslogtreecommitdiffstats
path: root/papers/dat-paper.md
diff options
context:
space:
mode:
Diffstat (limited to 'papers/dat-paper.md')
-rw-r--r--papers/dat-paper.md30
1 files changed, 15 insertions, 15 deletions
diff --git a/papers/dat-paper.md b/papers/dat-paper.md
index 0c65cc4..0f40700 100644
--- a/papers/dat-paper.md
+++ b/papers/dat-paper.md
@@ -294,21 +294,21 @@ Dat is also able to fully or partially synchronize streams in a distributed sett
TODO example of using protocol messages to request a subset of nodes in a live sync scenario
```js
-var feed = [
- {
- hash: sha256(value + size),
- size: value.length
- value: <some buffer>
- },
- {
- hash: sha256(feed[0].hash + feed[2].hash + size),
- size: feed[0].size + feed[1].size
- },
- {
- hash: sha256(value + size),
- size: value.length
- value: <some buffer>
- }
+var log = [
+{
+ hash: hash(value + size),
+ size: value.length
+ value: <some buffer>
+},
+{
+ hash: hash(log[0].hash+log[2].hash+size),
+ size: log[0].size + log[1].size
+},
+{
+ hash: hash(value + size),
+ size: value.length
+ value: <some buffer>
+}
]
```