Removing halving event code.

This commit is contained in:
softsimon 2020-05-12 14:49:29 +07:00
parent 422055046e
commit 910696e41c
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
9 changed files with 3 additions and 190 deletions

View File

@ -1,6 +1,6 @@
<div class="blocks-container" *ngIf="blocks.length">
<div *ngFor="let block of blocks; let i = index; trackBy: trackByBlocksFn" >
<div class="text-center bitcoin-block mined-block" [class.blink-bg]="block.height % 210000 === 0" id="bitcoin-block-{{ block.height }}" [ngStyle]="getStyleForBlock(block)">
<div class="text-center bitcoin-block mined-block" id="bitcoin-block-{{ block.height }}" [ngStyle]="getStyleForBlock(block)">
<a [routerLink]="['/block/' | relativeUrl, block.id]" [state]="{ data: { block: block } }" class="blockLink">&nbsp;</a>
<div class="block-height">
<a [routerLink]="['/block/' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a>

View File

@ -101,19 +101,3 @@
border-right: 35px solid transparent;
border-bottom: 35px solid #FFF;
}
// Blinking block
.blink-bg {
color: #fff;
animation: blinkingBackground 1s infinite;
background: inherit !important;
}
@keyframes blinkingBackground {
0% { background-color: #10c018;}
25% { background-color: #1056c0;}
50% { background-color: #ef0a1a;}
75% { background-color: #CFB53B;}
100% { background-color: #04a1d5;}
}

View File

@ -1,8 +1,3 @@
<div class="text-center pb-1" *ngIf="network === '' && latestBlockHeight && latestBlockHeight < 630000">
<h3>Quantitative Hardening in {{ 630000 - latestBlockHeight }} blocks (~<app-timespan [time]="(630000 - latestBlockHeight) * 10 * 60"></app-timespan>)</h3>
</div>
<div class="container-xl">
<hr>

View File

@ -1,7 +1,7 @@
<div class="mempool-blocks-container">
<div class="flashing">
<div *ngFor="let projectedBlock of mempoolBlocks; let i = index; trackBy: trackByFn">
<div class="bitcoin-block text-center mempool-block" [class.blink-bg]="blocksLeftToHalving === (i + 1)" id="mempool-block-{{ i }}" [ngStyle]="getStyleForMempoolBlockAtIndex(i)">
<div class="bitcoin-block text-center mempool-block" id="mempool-block-{{ i }}" [ngStyle]="getStyleForMempoolBlockAtIndex(i)">
<a [routerLink]="['/mempool-block/' | relativeUrl, i]" class="blockLink">&nbsp;</a>
<div class="block-body" *ngIf="mempoolBlocks?.length">
<div class="fees">

View File

@ -111,21 +111,3 @@
left: 0;
z-index: 10;
}
// Blinking block
.blink-bg {
color: #fff;
animation: blinkingBackground 1s infinite;
background: inherit !important;
}
@keyframes blinkingBackground {
0% { background-color: #10c018;}
25% { background-color: #1056c0;}
50% { background-color: #ef0a1a;}
75% { background-color: #CFB53B;}
100% { background-color: #04a1d5;}
}

View File

@ -1,8 +1,3 @@
<div class="pyro" *ngIf="isHalveningeEvent">
<div class="before"></div>
<div class="after"></div>
</div>
<div style="position: relative;">
<app-blockchain></app-blockchain>
</div>

View File

@ -1,132 +1,3 @@
.search-container {
padding-top: 50px;
}
// Fireworks
$particles: 50;
$width: 500;
$height: 500;
// Create the explosion...
$box-shadow: ();
$box-shadow2: ();
@for $i from 0 through $particles {
$box-shadow: $box-shadow,
random($width)-$width / 2 + px
random($height)-$height / 1.2 + px
hsl(random(360), 100, 50);
$box-shadow2: $box-shadow2, 0 0 #fff
}
@mixin keyframes ($animationName) {
@-webkit-keyframes #{$animationName} {
@content;
}
@-moz-keyframes #{$animationName} {
@content;
}
@-o-keyframes #{$animationName} {
@content;
}
@-ms-keyframes #{$animationName} {
@content;
}
@keyframes #{$animationName} {
@content;
}
}
@mixin animation-delay ($settings) {
-moz-animation-delay: $settings;
-webkit-animation-delay: $settings;
-o-animation-delay: $settings;
-ms-animation-delay: $settings;
animation-delay: $settings;
}
@mixin animation-duration ($settings) {
-moz-animation-duration: $settings;
-webkit-animation-duration: $settings;
-o-animation-duration: $settings;
-ms-animation-duration: $settings;
animation-duration: $settings;
}
@mixin animation ($settings) {
-moz-animation: $settings;
-webkit-animation: $settings;
-o-animation: $settings;
-ms-animation: $settings;
animation: $settings;
}
@mixin transform ($settings) {
transform: $settings;
-moz-transform: $settings;
-webkit-transform: $settings;
-o-transform: $settings;
-ms-transform: $settings;
}
body {
margin:0;
padding:0;
background: #000;
overflow: hidden;
}
.pyro > .before, .pyro > .after {
z-index: 100;
position: absolute;
width: 5px;
height: 5px;
border-radius: 50%;
box-shadow: $box-shadow2;
@include animation((1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards));
}
.pyro > .after {
@include animation-delay((1.25s, 1.25s, 1.25s));
@include animation-duration((1.25s, 1.25s, 6.25s));
}
@include keyframes(bang) {
to {
box-shadow:$box-shadow;
}
}
@include keyframes(gravity) {
to {
@include transform(translateY(200px));
opacity: 0;
}
}
@include keyframes(position) {
0%, 19.9% {
margin-top: 10%;
margin-left: 40%;
}
20%, 39.9% {
margin-top: 40%;
margin-left: 30%;
}
40%, 59.9% {
margin-top: 20%;
margin-left: 70%
}
60%, 79.9% {
margin-top: 30%;
margin-left: 20%;
}
80%, 99.9% {
margin-top: 30%;
margin-left: 80%;
}
}

View File

@ -1,6 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { WebsocketService } from 'src/app/services/websocket.service';
import { StateService } from 'src/app/services/state.service';
@Component({
selector: 'app-start',
@ -10,24 +9,11 @@ import { StateService } from 'src/app/services/state.service';
export class StartComponent implements OnInit {
view: 'blocks' | 'transactions' = 'blocks';
isHalveningeEvent = false;
constructor(
private websocketService: WebsocketService,
private stateService: StateService,
) { }
ngOnInit() {
this.websocketService.want(['blocks', 'stats', 'mempool-blocks']);
this.stateService.blocks$
.subscribe((block) => {
if (block.height % 210000 === 0) {
this.isHalveningeEvent = true;
setTimeout(() => {
this.isHalveningeEvent = false;
}, 60 * 60 * 1000);
}
});
}
}

View File

@ -110,7 +110,7 @@
</tr>
<tr *ngIf="tx.vout.length > tx['@voutLength']">
<td colspan="3" class="text-center">
<button class="btn btn-sm btn-primary mt-2" (click)="loadMoreVout(tx)">Load more</button>
<button class="btn btn-sm btn-primary mt-2" (click)="loadMoreVout(tx)">Load more ({{ tx.vout.length - tx['@voutLength'] }})</button>
</td>
</tr>
<tr>