animate mempool blocks conditional on mined block similarity

This commit is contained in:
Mononaut committed 2023-03-16 22:16:40 +09:00
1 parent 64ab14f995
commit c24724dcdf
5 files changed
+18 -6

No files matched your search

@@ -174,7 +174,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
}
this.chainTip = this.stateService.latestBlockHeight;
if (block?.extras?.matchRate >= 66 && !this.tabHidden) {
if ((block?.extras?.similarity == null || block?.extras?.similarity > 0.5) && !this.tabHidden) {
this.blockIndex++;
}
});
@@ -225,7 +225,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
}
trackByFn(index: number, block: MempoolBlock) {
return (block.isStack) ? 'stack' : block.height;
return (block.isStack) ? 'stack' : block.index;
}
reduceMempoolBlocksToFitScreen(blocks: MempoolBlock[]): MempoolBlock[] {