animate mempool blocks conditional on mined block similarity

This commit is contained in:
Mononaut
2023-03-14 10:19:32 +09:00
parent 40a80953a7
commit 8e0495a358
5 changed files with 18 additions and 6 deletions

View File

@@ -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[] {

View File

@@ -118,6 +118,7 @@ export interface BlockExtension {
reward?: number;
coinbaseRaw?: string;
matchRate?: number;
similarity?: number;
pool?: {
id: number;
name: string;