fix coinbase audit

This commit is contained in:
Léo Haf 2025-03-17 14:43:54 +01:00
parent 00811a438d
commit 125b65e586
Signed by: Retropex
GPG Key ID: 0E37EBAB8574F005

View File

@ -29,6 +29,7 @@ class Audit {
let matchedWeight = 0;
let projectedWeight = 0;
let countCb = 0;
let spamWeight = 0;
let blkWeight = 0;
@ -82,12 +83,15 @@ class Audit {
}
for (const tx of transactions){
if (countCb !== 0){
if(tx.spam !== undefined){
if (tx.spam == true){
spamWeight += tx.weight;
}
}
}
countCb += 1;
}
// we can expect an honest miner to include 'displaced' transactions in place of recent arrivals and censored txs
// these displaced transactions should occupy the first N weight units of the next projected block