Compare commits

...

1 Commits

Author SHA1 Message Date
Mononaut
f0f4f8f920
Announce difficulty locked in on last block of epoch 2023-05-11 13:23:08 -06:00
3 changed files with 15 additions and 0 deletions

View File

@ -33,6 +33,7 @@
repeatCount="indefinite"/>
</rect>
</svg>
<span *ngIf="lockedIn" class="lock-in-msg" i18n="difficulty-box.adjustment-locked-in">Difficulty adjustment locked in</span>
</div>
<div class="difficulty-stats">
<div class="item">

View File

@ -172,6 +172,18 @@
width: 100%;
height: 22px;
margin-bottom: 12px;
position: relative;
.lock-in-msg {
position: absolute;
left: 0;
right: 0;
top: 0;
font-size: 12px;
line-height: 22px;
width: 100%;
text-align: center;
}
}
.epoch-blocks {

View File

@ -54,6 +54,7 @@ export class DifficultyComponent implements OnInit {
expectedHeight: number;
expectedIndex: number;
difference: number;
lockedIn: boolean = false;
shapes: DiffShape[];
tooltipPosition = { x: 0, y: 0 };
@ -104,6 +105,7 @@ export class DifficultyComponent implements OnInit {
this.currentIndex = this.currentHeight - this.epochStart;
this.expectedIndex = Math.min(this.expectedHeight - this.epochStart, 2016) - 1;
this.difference = this.currentIndex - this.expectedIndex;
this.lockedIn = this.currentIndex === 2015;
this.shapes = [];
this.shapes = this.shapes.concat(this.blocksToShapes(