replace client recent blocks on reorg

This commit is contained in:
Mononaut
2023-07-08 01:07:06 -04:00
parent 9cf961c667
commit e8c703fdbc
20 changed files with 153 additions and 99 deletions

View File

@@ -132,8 +132,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
this.blocks$ = this.stateService.blocks$
.pipe(
tap(([block]) => {
this.latestBlockHeight = block.height;
tap((blocks) => {
this.latestBlockHeight = blocks[0].height;
}),
scan((acc, [block]) => {
if (acc.find((b) => b.height == block.height)) {