From c4f7b99978b101a5f301203c18767b810f7c59ba Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 14 Jun 2023 16:15:33 -0400 Subject: [PATCH] add backfilled audit stats to cached blocks --- backend/src/api/blocks.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index e080285ed..8d6a6b50d 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -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++;