Comparing version 2.10.0 to 2.10.1
@@ -602,3 +602,3 @@ const codecs = require('codecs') | ||
this.options.onwait = null | ||
this.tree.extension.get(this.rootSeq, key) | ||
this.tree.extension.get(this.rootSeq + 1, key) | ||
} | ||
@@ -605,0 +605,0 @@ |
@@ -75,16 +75,14 @@ const { Extension } = require('./messages') | ||
onget (message, from) { | ||
if (!message.version) return | ||
if (!message.version || message.version > this.db.version) return | ||
const b = new Batch(this.outgoing, from) | ||
const done = b.send.bind(b) | ||
const db = this.db.checkout(message.version) | ||
this.db.checkout(message.version) | ||
.get(message.key, { | ||
extension: false, | ||
wait: false, | ||
update: false, | ||
onseq | ||
}) | ||
.then(done, done) | ||
db.get(message.key, { extension: false, wait: false, update: false, onseq }).then(done, done) | ||
function done () { | ||
db.close().catch(noop) | ||
b.send() | ||
} | ||
function onseq (seq) { | ||
@@ -96,3 +94,3 @@ b.push(seq) | ||
async oniterator (message, from) { | ||
if (!message.version) return | ||
if (!message.version || message.version > this.db.version) return | ||
@@ -127,2 +125,3 @@ const b = new Batch(this.outgoing, from) | ||
} finally { | ||
db.close().catch(noop) | ||
b.send() | ||
@@ -150,1 +149,3 @@ } | ||
} | ||
function noop () {} |
{ | ||
"name": "hyperbee", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"description": "An append-only B-tree running on a Hypercore.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
87336
2435