add backfilled audit stats to cached blocks

This commit is contained in:
Mononaut 2023-06-14 16:15:33 -04:00
parent 6b93e61b56
commit c4f7b99978
No known key found for this signature in database
GPG key ID: A3F058E41374C04E

View file

@ -480,6 +480,11 @@ class Blocks {
totalWeight += (tx.vsize * 4);
}
await BlocksAuditsRepository.$setSummary(hash, totalFees, totalWeight);
const cachedBlock = this.blocks.find(block => block.id === hash);
if (cachedBlock) {
cachedBlock.extras.expectedFees = totalFees;
cachedBlock.extras.expectedWeight = totalWeight;
}
indexedThisRun++;
indexedTotal++;