Merge pull request #3846 from mempool/mononaut/audit-details

Add expected vs actual audit details comparison table
This commit is contained in:
softsimon
2023-06-14 23:05:07 +02:00
committed by GitHub
16 changed files with 282 additions and 18 deletions

View File

@@ -1018,10 +1018,14 @@ class BlocksRepository {
// Match rate is not part of the blocks table, but it is part of APIs so we must include it
extras.matchRate = null;
extras.expectedFees = null;
extras.expectedWeight = null;
if (config.MEMPOOL.AUDIT) {
const auditScore = await BlocksAuditsRepository.$getBlockAuditScore(dbBlk.id);
if (auditScore != null) {
extras.matchRate = auditScore.matchRate;
extras.expectedFees = auditScore.expectedFees;
extras.expectedWeight = auditScore.expectedWeight;
}
}