Merge pull request #3102 from mempool/mononaut/block-health-calculation

Ignore coinbase transaction in block health calculation
This commit is contained in:
softsimon 2023-02-26 13:08:31 +04:00 committed by GitHub
commit 32a0f4f6e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,8 @@ class Audit {
}
const numCensored = Object.keys(isCensored).length;
const score = matches.length > 0 ? (matches.length / (matches.length + numCensored)) : 0;
const numMatches = matches.length - 1; // adjust for coinbase tx
const score = numMatches > 0 ? (numMatches / (numMatches + numCensored)) : 0;
return {
censored: Object.keys(isCensored),