animate mempool blocks conditional on mined block similarity
This commit is contained in:
1 parent
40a80953a7
commit
8e0495a358
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[] {
|
||||
|
||||
@@ -118,6 +118,7 @@ export interface BlockExtension {
|
||||
reward?: number;
|
||||
coinbaseRaw?: string;
|
||||
matchRate?: number;
|
||||
similarity?: number;
|
||||
pool?: {
|
||||
id: number;
|
||||
name: string;
|
||||
|
||||
Reference in new issue
Block a user