mirror of
https://github.com/mempool/mempool.git
synced 2025-03-13 19:37:47 +01:00
filter accelerations before calculating pool positions
This commit is contained in:
parent
14e49126c3
commit
5f45ce80f1
1 changed files with 1 additions and 1 deletions
|
@ -688,7 +688,7 @@ class MempoolBlocks {
|
|||
[pool: string]: { name: string, block: number, vsize: number, accelerations: string[], complete: boolean };
|
||||
} = {};
|
||||
// prepare a list of accelerations in ascending order (we'll pop items off the end of the list)
|
||||
const accQueue: { acceleration: Acceleration, rate: number, vsize: number }[] = Object.values(accelerations).map(acc => {
|
||||
const accQueue: { acceleration: Acceleration, rate: number, vsize: number }[] = Object.values(accelerations).filter(acc => acc.txid in mempoolCache).map(acc => {
|
||||
let vsize = mempoolCache[acc.txid].vsize;
|
||||
for (const ancestor of mempoolCache[acc.txid].ancestors || []) {
|
||||
vsize += (ancestor.weight / 4);
|
||||
|
|
Loading…
Add table
Reference in a new issue