querysub 0.467.0 → 0.469.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -396,13 +396,16 @@ async function auditAuthority(nodeId: string, pathsToAudit: { path: string }[],
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
if (valuesToRequest.length > 0) {
|
|
399
|
-
let
|
|
400
|
-
if (
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
399
|
+
let receivedBuffers = await PathAuditerController.nodes[nodeId].getPathValues(valuesToRequest);
|
|
400
|
+
if (receivedBuffers.length > 0) {
|
|
401
|
+
let receivedValues = await pathValueSerializer.deserialize(receivedBuffers);
|
|
402
|
+
if (receivedValues.length > 0) {
|
|
403
|
+
validStateComputer.ingestValuesAndValidStates({
|
|
404
|
+
pathValues: receivedValues,
|
|
405
|
+
parentSyncs: [],
|
|
406
|
+
initialTriggers: { values: new Set(), parentPaths: new Set() },
|
|
407
|
+
});
|
|
408
|
+
}
|
|
406
409
|
}
|
|
407
410
|
}
|
|
408
411
|
|
|
@@ -456,7 +459,7 @@ class PathAuditerService {
|
|
|
456
459
|
return results;
|
|
457
460
|
}
|
|
458
461
|
|
|
459
|
-
public async getPathValues(requests: PathTimeRequest[]): Promise<
|
|
462
|
+
public async getPathValues(requests: PathTimeRequest[]): Promise<Buffer[]> {
|
|
460
463
|
let results: PathValue[] = [];
|
|
461
464
|
for (let request of requests) {
|
|
462
465
|
let value = authorityStorage.getValueAtOrBeforeTime(request.path, request.time);
|
|
@@ -464,7 +467,8 @@ class PathAuditerService {
|
|
|
464
467
|
results.push(value);
|
|
465
468
|
}
|
|
466
469
|
}
|
|
467
|
-
return
|
|
470
|
+
if (results.length === 0) return [];
|
|
471
|
+
return await pathValueSerializer.serialize(results);
|
|
468
472
|
}
|
|
469
473
|
|
|
470
474
|
public async ingestPathValues(serializedValues: Buffer[]): Promise<void> {
|