fix audit replication merge conflicts

This commit is contained in:
Mononaut 2023-07-14 16:47:58 +09:00
parent bccc6b3680
commit e59a9d38ff
No known key found for this signature in database
GPG key ID: A3F058E41374C04E

View file

@ -37,7 +37,7 @@ class AuditReplication {
let loggerTimer = Date.now();
// process missing audits in batches of
for (let i = 0; i < missingAudits.length; i += BATCH_SIZE) {
const slice = missingAudits.slice(i * BATCH_SIZE, (i + 1) * BATCH_SIZE);
const slice = missingAudits.slice(i, i + BATCH_SIZE);
const results = await Promise.all(slice.map(hash => this.$syncAudit(hash)));
const synced = results.reduce((total, status) => status ? total + 1 : total, 0);
totalSynced += synced;
@ -114,6 +114,7 @@ class AuditReplication {
addedTxs: auditSummary.addedTxs || [],
freshTxs: auditSummary.freshTxs || [],
sigopTxs: auditSummary.sigopTxs || [],
fullrbfTxs: auditSummary.fullrbfTxs || [],
matchRate: auditSummary.matchRate,
expectedFees: auditSummary.expectedFees,
expectedWeight: auditSummary.expectedWeight,