Announce difficulty locked in on last block of epoch
This commit is contained in:
		
							parent
							
								
									49529627f8
								
							
						
					
					
						commit
						f0f4f8f920
					
				@ -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">
 | 
			
		||||
 | 
			
		||||
@ -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 {
 | 
			
		||||
 | 
			
		||||
@ -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(
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user