Merge branch 'master' into knorrium/fix_missing_assets
This commit is contained in:
		
						commit
						7063d9e113
					
				| @ -1,4 +1,4 @@ | |||||||
| FROM node:20.11.1-buster-slim AS builder | FROM node:20.12.0-buster-slim AS builder | ||||||
| 
 | 
 | ||||||
| ARG commitHash | ARG commitHash | ||||||
| ENV MEMPOOL_COMMIT_HASH=${commitHash} | ENV MEMPOOL_COMMIT_HASH=${commitHash} | ||||||
| @ -17,7 +17,7 @@ ENV PATH="/root/.cargo/bin:$PATH" | |||||||
| RUN npm install --omit=dev --omit=optional | RUN npm install --omit=dev --omit=optional | ||||||
| RUN npm run package | RUN npm run package | ||||||
| 
 | 
 | ||||||
| FROM node:20.11.1-buster-slim | FROM node:20.12.0-buster-slim | ||||||
| 
 | 
 | ||||||
| WORKDIR /backend | WORKDIR /backend | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| FROM node:20.11.1-buster-slim AS builder | FROM node:20.12.0-buster-slim AS builder | ||||||
| 
 | 
 | ||||||
| ARG commitHash | ARG commitHash | ||||||
| ENV DOCKER_COMMIT_HASH=${commitHash} | ENV DOCKER_COMMIT_HASH=${commitHash} | ||||||
|  | |||||||
| @ -20,10 +20,12 @@ | |||||||
|                 - |                 - | ||||||
|                 <app-fee-rate [fee]="projectedBlock.feeRange[projectedBlock.feeRange.length - 1]" rounding="1.0-0" unitClass=""></app-fee-rate> |                 <app-fee-rate [fee]="projectedBlock.feeRange[projectedBlock.feeRange.length - 1]" rounding="1.0-0" unitClass=""></app-fee-rate> | ||||||
|               </div> |               </div> | ||||||
|               <div *ngIf="showMiningInfo" class="block-size"> |               <div *ngIf="showMiningInfo$ | async; else noMiningInfo" class="block-size"> | ||||||
|                 <app-amount [attr.data-cy]="'mempool-block-' + i + '-total-fees'" [satoshis]="projectedBlock.totalFees" digitsInfo="1.2-3" [noFiat]="true"></app-amount> |                 <app-amount [attr.data-cy]="'mempool-block-' + i + '-total-fees'" [satoshis]="projectedBlock.totalFees" digitsInfo="1.2-3" [noFiat]="true"></app-amount> | ||||||
|               </div> |               </div> | ||||||
|               <div *ngIf="!showMiningInfo" class="block-size" [innerHTML]="'‎' + (projectedBlock.blockSize | bytes: 2)"></div> |               <ng-template #noMiningInfo> | ||||||
|  |                 <div class="block-size" [innerHTML]="'‎' + (projectedBlock.blockSize | bytes: 2)"></div> | ||||||
|  |               </ng-template> | ||||||
|               <div [attr.data-cy]="'mempool-block-' + i + '-transaction-count'" class="transaction-count"> |               <div [attr.data-cy]="'mempool-block-' + i + '-transaction-count'" class="transaction-count"> | ||||||
|                 <ng-container *ngTemplateOutlet="projectedBlock.nTx === 1 ? transactionsSingular : transactionsPlural; context: {$implicit: projectedBlock.nTx | number}"></ng-container> |                 <ng-container *ngTemplateOutlet="projectedBlock.nTx === 1 ? transactionsSingular : transactionsPlural; context: {$implicit: projectedBlock.nTx | number}"></ng-container> | ||||||
|                 <ng-template #transactionsSingular let-i i18n="shared.transaction-count.singular">{{ i }} transaction</ng-template> |                 <ng-template #transactionsSingular let-i i18n="shared.transaction-count.singular">{{ i }} transaction</ng-template> | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef, HostListener, Input, OnChanges, SimpleChanges, Output, EventEmitter } from '@angular/core'; | import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef, HostListener, Input, OnChanges, SimpleChanges, Output, EventEmitter } from '@angular/core'; | ||||||
| import { Subscription, Observable, of, combineLatest } from 'rxjs'; | import { Subscription, Observable, of, combineLatest, BehaviorSubject } from 'rxjs'; | ||||||
| import { MempoolBlock } from '../../interfaces/websocket.interface'; | import { MempoolBlock } from '../../interfaces/websocket.interface'; | ||||||
| import { StateService } from '../../services/state.service'; | import { StateService } from '../../services/state.service'; | ||||||
| import { Router } from '@angular/router'; | import { Router } from '@angular/router'; | ||||||
| @ -42,6 +42,7 @@ export class MempoolBlocksComponent implements OnInit, OnChanges, OnDestroy { | |||||||
|   mempoolBlocks$: Observable<MempoolBlock[]>; |   mempoolBlocks$: Observable<MempoolBlock[]>; | ||||||
|   difficultyAdjustments$: Observable<DifficultyAdjustment>; |   difficultyAdjustments$: Observable<DifficultyAdjustment>; | ||||||
|   loadingBlocks$: Observable<boolean>; |   loadingBlocks$: Observable<boolean>; | ||||||
|  |   showMiningInfo$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false); | ||||||
|   blocksSubscription: Subscription; |   blocksSubscription: Subscription; | ||||||
| 
 | 
 | ||||||
|   mempoolBlocksFull: MempoolBlock[] = []; |   mempoolBlocksFull: MempoolBlock[] = []; | ||||||
| @ -57,10 +58,8 @@ export class MempoolBlocksComponent implements OnInit, OnChanges, OnDestroy { | |||||||
|   network = ''; |   network = ''; | ||||||
|   now = new Date().getTime(); |   now = new Date().getTime(); | ||||||
|   timeOffset = 0; |   timeOffset = 0; | ||||||
|   showMiningInfo = false; |  | ||||||
|   timeLtrSubscription: Subscription; |   timeLtrSubscription: Subscription; | ||||||
|   timeLtr: boolean; |   timeLtr: boolean; | ||||||
|   showMiningInfoSubscription: Subscription; |  | ||||||
|   animateEntry: boolean = false; |   animateEntry: boolean = false; | ||||||
| 
 | 
 | ||||||
|   blockOffset: number = 155; |   blockOffset: number = 155; | ||||||
| @ -98,10 +97,7 @@ export class MempoolBlocksComponent implements OnInit, OnChanges, OnDestroy { | |||||||
|     this.widthChange.emit(this.mempoolWidth); |     this.widthChange.emit(this.mempoolWidth); | ||||||
| 
 | 
 | ||||||
|     if (['', 'testnet', 'signet'].includes(this.stateService.network)) { |     if (['', 'testnet', 'signet'].includes(this.stateService.network)) { | ||||||
|       this.showMiningInfoSubscription = this.stateService.showMiningInfo$.subscribe((showMiningInfo) => { |       this.showMiningInfo$ = this.stateService.showMiningInfo$; | ||||||
|         this.showMiningInfo = showMiningInfo; |  | ||||||
|         this.cd.markForCheck(); |  | ||||||
|       }); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     this.timeLtrSubscription = this.stateService.timeLtr.subscribe((ltr) => { |     this.timeLtrSubscription = this.stateService.timeLtr.subscribe((ltr) => { | ||||||
| @ -267,7 +263,6 @@ export class MempoolBlocksComponent implements OnInit, OnChanges, OnDestroy { | |||||||
|     this.chainTipSubscription.unsubscribe(); |     this.chainTipSubscription.unsubscribe(); | ||||||
|     this.keySubscription.unsubscribe(); |     this.keySubscription.unsubscribe(); | ||||||
|     this.isTabHiddenSubscription.unsubscribe(); |     this.isTabHiddenSubscription.unsubscribe(); | ||||||
|     this.showMiningInfoSubscription.unsubscribe(); |  | ||||||
|     clearTimeout(this.resetTransitionTimeout); |     clearTimeout(this.resetTransitionTimeout); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,8 +1,7 @@ | |||||||
| #!/usr/bin/env zsh | #!/usr/bin/env zsh | ||||||
| #for j in fmt va1 fra tk7;do for i in 1 2 3 4 5 6;do echo -n 20$i.$j: ;curl -i -s https://node20$i.$j.mempool.space/api/v1/services/accelerator/accelerations|head -1;done;done | #for j in fmt va1 fra tk7;do for i in 1 2 3 4 5 6;do echo -n 20$i.$j: ;curl -i -s https://node20$i.$j.mempool.space/api/v1/services/accelerator/accelerations|head -1;done;done | ||||||
| check_mempoolspace_frontend_git_hash() { | check_mempoolspace_frontend_git_hash() { | ||||||
| 	echo curl -s --connect-to "::node${1}.${2}.mempool.space:443" https://mempool.space/resources/config.js | 	echo -n $(curl -s --connect-to "::node${1}.${2}.mempool.space:443" https://mempool.space/en-US/resources/config.js|grep GIT_COMMIT_HASH|cut -d "'" -f2|cut -c1-8) | ||||||
| 	echo -n $(curl -s --connect-to "::node${1}.${2}.mempool.space:443" https://mempool.space/resources/config.js|grep GIT_COMMIT_HASH|cut -d "'" -f2|cut -c1-8) |  | ||||||
| } | } | ||||||
| check_mempoolfoss_frontend_git_hash() { | check_mempoolfoss_frontend_git_hash() { | ||||||
| 	echo -n $(curl -s "https://node${1}.${2}.mempool.space/resources/config.js"|grep GIT_COMMIT_HASH|cut -d "'" -f2|cut -c1-8) | 	echo -n $(curl -s "https://node${1}.${2}.mempool.space/resources/config.js"|grep GIT_COMMIT_HASH|cut -d "'" -f2|cut -c1-8) | ||||||
| @ -13,19 +12,24 @@ check_mempoolspace_frontend_md5_hash() { | |||||||
| check_mempoolfoss_frontend_md5_hash() { | check_mempoolfoss_frontend_md5_hash() { | ||||||
| 	echo -n $(curl -s https://node${1}.${2}.mempool.space|md5|cut -c1-8) | 	echo -n $(curl -s https://node${1}.${2}.mempool.space|md5|cut -c1-8) | ||||||
| } | } | ||||||
|  | check_mempool_electrs_git_hash() { | ||||||
|  | 	echo -n $(curl -s -i https://node${1}.${2}.mempool.space/api/mempool|grep -i x-powered-by|cut -d ' ' -f3) | ||||||
|  | } | ||||||
| for site in fmt va1 fra tk7;do | for site in fmt va1 fra tk7;do | ||||||
| 	echo "${site}" | 	echo "${site}" | ||||||
| 	for node in 201 202 203 204 205 206 207 208 209 210 211 212 213 214;do | 	for node in 201 202 203 204 205 206 207 208 209 210 211 212 213 214;do | ||||||
| 		[ "${site}" = "fmt" ] && [ "${node}" -gt 206 ] && continue | 		[ "${site}" = "fmt" ] && [ "${node}" -gt 206 ] && continue | ||||||
| 		[ "${site}" = "tk7" ] && [ "${node}" -gt 206 ] && continue | 		[ "${site}" = "tk7" ] && [ "${node}" -gt 206 ] && continue | ||||||
| 		echo -n "node${node}.${site}: " | 		echo -n "node${node}.${site}: " | ||||||
| 		#check_mempoolspace_frontend_git_hash $node $site | 		check_mempoolspace_frontend_git_hash $node $site | ||||||
| 		#echo -n " " |  | ||||||
| 		check_mempoolspace_frontend_md5_hash $node $site |  | ||||||
| 		echo -n " " | 		echo -n " " | ||||||
| 		check_mempoolfoss_frontend_git_hash $node $site | 		check_mempoolfoss_frontend_git_hash $node $site | ||||||
| 		echo -n " " | 		echo -n " " | ||||||
|  | 		check_mempoolspace_frontend_md5_hash $node $site | ||||||
|  | 		echo -n " " | ||||||
| 		check_mempoolfoss_frontend_md5_hash $node $site | 		check_mempoolfoss_frontend_md5_hash $node $site | ||||||
|  | 		echo -n " " | ||||||
|  | 		check_mempool_electrs_git_hash $node $site | ||||||
| 		echo | 		echo | ||||||
| 	done | 	done | ||||||
| done | done | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user