Skip to content

Commit

Permalink
fix: fix into cc16af9
Browse files Browse the repository at this point in the history
  • Loading branch information
tegefaulkes authored and CMCDragonkai committed Mar 26, 2022
1 parent 95299cd commit b3dd668
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/discovery/Discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Discovery {
reverse: true,
});
for await (const o of keyStream) {
latestId = IdInternal.fromBuffer<DiscoveryQueueId>(o);
latestId = IdInternal.fromBuffer<DiscoveryQueueId>(o as Buffer);
}
this.discoveryQueueIdGenerator =
discoveryUtils.createDiscoveryQueueIdGenerator(latestId);
Expand Down Expand Up @@ -208,8 +208,9 @@ class Discovery {
while (true) {
if (!(await this.queueIsEmpty())) {
for await (const o of this.discoveryQueueDb.createReadStream()) {
const vertexId = IdInternal.fromBuffer(o.key) as DiscoveryQueueId;
const data = o.value as Buffer;
const kv = (o as any)
const vertexId = IdInternal.fromBuffer(kv.key) as DiscoveryQueueId;
const data = kv.value as Buffer;
const vertex = await this.db.deserializeDecrypt<GestaltKey>(
data,
false,
Expand Down Expand Up @@ -438,7 +439,7 @@ class Discovery {
limit: 1,
});
for await (const o of keyStream) {
nextDiscoveryQueueId = IdInternal.fromBuffer<DiscoveryQueueId>(o);
nextDiscoveryQueueId = IdInternal.fromBuffer<DiscoveryQueueId>(o as Buffer);
}
if (nextDiscoveryQueueId == null) {
return true;
Expand Down

0 comments on commit b3dd668

Please sign in to comment.