@daaku/kombat
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -9,9 +9,2 @@ "use strict"; | ||
const kClock = 'clock'; | ||
class DuplicateNodeError extends Error { | ||
constructor(nodeID) { | ||
super(); | ||
this.type = 'DuplicateNodeError'; | ||
this.message = `duplicate node identifier: ${nodeID}`; | ||
} | ||
} | ||
class ClockDriftError extends Error { | ||
@@ -194,6 +187,2 @@ constructor(context) { | ||
const now = Date.now(); | ||
// prevent accidental usage where we recv our own timestamp. | ||
if (ts.nodeID === this.timestamp.nodeID) { | ||
throw new DuplicateNodeError(ts.nodeID); | ||
} | ||
// TODO: again, why is clock drift an issue? why can't we accept this? | ||
@@ -200,0 +189,0 @@ if (ts.millis - now > this.maxDriftMS) { |
{ | ||
"name": "@daaku/kombat", | ||
"author": "Naitik Shah <n@daaku.org>", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Infrastructure for CRDT powered applications.", | ||
@@ -6,0 +6,0 @@ "repository": "git@github.com:daaku/kombat", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41071
588