Merge branch 'master' into nymkappa/bugfix/blocks-list-signet
This commit is contained in:
		
						commit
						035b29e70b
					
				@ -29,5 +29,5 @@ Mempool can be conveniently installed on the following full-node distros:
 | 
			
		||||
Mempool can be installed in other ways too, but we only recommend doing so if you're a developer, have experience managing servers, or otherwise know what you're doing.
 | 
			
		||||
 | 
			
		||||
- See the [`docker/`](./docker/) directory for instructions on deploying Mempool with Docker.
 | 
			
		||||
- See the [`backend/`](./backend/) and [`frontend/`](./frontend/) directories for manual install instructions oriented for developers and small-scale deployments.
 | 
			
		||||
- See the [`production/`](./production/) directory for guidance on setting up a more serious Mempool instance designed for high performance at scale.
 | 
			
		||||
- See the [`backend/`](./backend/) and [`frontend/`](./frontend/) directories for manual install instructions oriented for developers.
 | 
			
		||||
- See the [`production/`](./production/) directory for guidance on setting up a more serious Mempool instance designed for high performance at scale.
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# Mempool Backend
 | 
			
		||||
 | 
			
		||||
These instructions are mostly intended for developers, but can be used as a basis for personal or small-scale production setups. 
 | 
			
		||||
These instructions are mostly intended for developers. 
 | 
			
		||||
 | 
			
		||||
If you choose to use these instructions for a production setup, be aware that you will still probably need to do additional configuration for your specific OS, environment, use-case, etc. We do our best here to provide a good starting point, but only proceed if you know what you're doing. Mempool does not provide support for custom setups.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -169,17 +169,16 @@ export class BlockFeeRatesGraphComponent implements OnInit {
 | 
			
		||||
          if (data.length <= 0) {
 | 
			
		||||
            return '';
 | 
			
		||||
          }
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 2px">
 | 
			
		||||
            ${formatterXAxis(this.locale, this.timespan, parseInt(data[0].axisValue, 10))}</b><br>`;
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 2px">${formatterXAxis(this.locale, this.timespan, parseInt(data[0].axisValue, 10))}</b><br>`;
 | 
			
		||||
 | 
			
		||||
          for (const pool of data.reverse()) {
 | 
			
		||||
            tooltip += `${pool.marker} ${pool.seriesName}: ${pool.data[1]} sats/vByte<br>`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if (['24h', '3d'].includes(this.timespan)) {
 | 
			
		||||
            tooltip += `<small>At block: ${data[0].data[2]}</small>`;
 | 
			
		||||
            tooltip += `<small>` + $localize`At block: ${data[0].data[2]}` + `</small>`;
 | 
			
		||||
          } else {
 | 
			
		||||
            tooltip += `<small>Around block ${data[0].data[2]}</small>`;
 | 
			
		||||
            tooltip += `<small>` + $localize`Around block: ${data[0].data[2]}` + `</small>`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          return tooltip;
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@ import { ApiService } from 'src/app/services/api.service';
 | 
			
		||||
import { SeoService } from 'src/app/services/seo.service';
 | 
			
		||||
import { formatNumber } from '@angular/common';
 | 
			
		||||
import { FormBuilder, FormGroup } from '@angular/forms';
 | 
			
		||||
import { download, formatterXAxisLabel } from 'src/app/shared/graphs.utils';
 | 
			
		||||
import { download, formatterXAxis, formatterXAxisLabel } from 'src/app/shared/graphs.utils';
 | 
			
		||||
import { StorageService } from 'src/app/services/storage.service';
 | 
			
		||||
import { MiningService } from 'src/app/services/mining.service';
 | 
			
		||||
 | 
			
		||||
@ -71,7 +71,7 @@ export class BlockFeesGraphComponent implements OnInit {
 | 
			
		||||
            .pipe(
 | 
			
		||||
              tap((response) => {
 | 
			
		||||
                this.prepareChartOptions({
 | 
			
		||||
                  blockFees: response.body.map(val => [val.timestamp * 1000, val.avgFees / 100000000]),
 | 
			
		||||
                  blockFees: response.body.map(val => [val.timestamp * 1000, val.avgFees / 100000000, val.avgHeight]),
 | 
			
		||||
                });
 | 
			
		||||
                this.isLoading = false;
 | 
			
		||||
              }),
 | 
			
		||||
@ -119,12 +119,17 @@ export class BlockFeesGraphComponent implements OnInit {
 | 
			
		||||
        },
 | 
			
		||||
        borderColor: '#000',
 | 
			
		||||
        formatter: (ticks) => {
 | 
			
		||||
          const tick = ticks[0];
 | 
			
		||||
          const feesString = `${tick.marker} ${tick.seriesName}: ${formatNumber(tick.data[1], this.locale, '1.3-3')} BTC`;
 | 
			
		||||
          return `
 | 
			
		||||
            <b style="color: white; margin-left: 18px">${tick.axisValueLabel}</b><br>
 | 
			
		||||
            <span>${feesString}</span>
 | 
			
		||||
          `;
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 2px">${formatterXAxis(this.locale, this.timespan, parseInt(ticks[0].axisValue, 10))}</b><br>`;
 | 
			
		||||
          tooltip += `${ticks[0].marker} ${ticks[0].seriesName}: ${formatNumber(ticks[0].data[1], this.locale, '1.3-3')} BTC`;
 | 
			
		||||
          tooltip += `<br>`;
 | 
			
		||||
 | 
			
		||||
          if (['24h', '3d'].includes(this.timespan)) {
 | 
			
		||||
            tooltip += `<small>` + $localize`At block: ${ticks[0].data[2]}` + `</small>`;
 | 
			
		||||
          } else {
 | 
			
		||||
            tooltip += `<small>` + $localize`Around block: ${ticks[0].data[2]}` + `</small>`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          return tooltip;
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      xAxis: {
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@ import { ApiService } from 'src/app/services/api.service';
 | 
			
		||||
import { SeoService } from 'src/app/services/seo.service';
 | 
			
		||||
import { formatNumber } from '@angular/common';
 | 
			
		||||
import { FormBuilder, FormGroup } from '@angular/forms';
 | 
			
		||||
import { download, formatterXAxisLabel } from 'src/app/shared/graphs.utils';
 | 
			
		||||
import { download, formatterXAxis, formatterXAxisLabel } from 'src/app/shared/graphs.utils';
 | 
			
		||||
import { MiningService } from 'src/app/services/mining.service';
 | 
			
		||||
import { StorageService } from 'src/app/services/storage.service';
 | 
			
		||||
 | 
			
		||||
@ -69,7 +69,7 @@ export class BlockRewardsGraphComponent implements OnInit {
 | 
			
		||||
            .pipe(
 | 
			
		||||
              tap((response) => {
 | 
			
		||||
                this.prepareChartOptions({
 | 
			
		||||
                  blockRewards: response.body.map(val => [val.timestamp * 1000, val.avgRewards / 100000000]),
 | 
			
		||||
                  blockRewards: response.body.map(val => [val.timestamp * 1000, val.avgRewards / 100000000, val.avgHeight]),
 | 
			
		||||
                });
 | 
			
		||||
                this.isLoading = false;
 | 
			
		||||
              }),
 | 
			
		||||
@ -117,12 +117,17 @@ export class BlockRewardsGraphComponent implements OnInit {
 | 
			
		||||
        },
 | 
			
		||||
        borderColor: '#000',
 | 
			
		||||
        formatter: (ticks) => {
 | 
			
		||||
          const tick = ticks[0];
 | 
			
		||||
          const rewardsString = `${tick.marker} ${tick.seriesName}: ${formatNumber(tick.data[1], this.locale, '1.3-3')} BTC`;
 | 
			
		||||
          return `
 | 
			
		||||
            <b style="color: white; margin-left: 18px">${tick.axisValueLabel}</b><br>
 | 
			
		||||
            <span>${rewardsString}</span>
 | 
			
		||||
          `;
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 2px">${formatterXAxis(this.locale, this.timespan, parseInt(ticks[0].axisValue, 10))}</b><br>`;
 | 
			
		||||
          tooltip += `${ticks[0].marker} ${ticks[0].seriesName}: ${formatNumber(ticks[0].data[1], this.locale, '1.3-3')} BTC`;
 | 
			
		||||
          tooltip += `<br>`;
 | 
			
		||||
 | 
			
		||||
          if (['24h', '3d'].includes(this.timespan)) {
 | 
			
		||||
            tooltip += `<small>` + $localize`At block: ${ticks[0].data[2]}` + `</small>`;
 | 
			
		||||
          } else {
 | 
			
		||||
            tooltip += `<small>` + $localize`Around block: ${ticks[0].data[2]}` + `</small>`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          return tooltip;
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      xAxis: {
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@ import { StorageService } from 'src/app/services/storage.service';
 | 
			
		||||
import { MiningService } from 'src/app/services/mining.service';
 | 
			
		||||
import { StateService } from 'src/app/services/state.service';
 | 
			
		||||
import { Router } from '@angular/router';
 | 
			
		||||
import { download } from 'src/app/shared/graphs.utils';
 | 
			
		||||
import { download, formatterXAxis } from 'src/app/shared/graphs.utils';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
  selector: 'app-block-sizes-weights-graph',
 | 
			
		||||
@ -107,7 +107,7 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
 | 
			
		||||
          color: 'grey',
 | 
			
		||||
          fontSize: 15
 | 
			
		||||
        },
 | 
			
		||||
        text: `Indexing in progess`,
 | 
			
		||||
        text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`,
 | 
			
		||||
        left: 'center',
 | 
			
		||||
        top: 'center'
 | 
			
		||||
      };
 | 
			
		||||
@ -141,27 +141,21 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
 | 
			
		||||
        },
 | 
			
		||||
        borderColor: '#000',
 | 
			
		||||
        formatter: (ticks) => {
 | 
			
		||||
          let sizeString = '';
 | 
			
		||||
          let weightString = '';
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 2px">${formatterXAxis(this.locale, this.timespan, parseInt(ticks[0].axisValue, 10))}</b><br>`;
 | 
			
		||||
 | 
			
		||||
          for (const tick of ticks) {
 | 
			
		||||
            if (tick.seriesIndex === 0) { // Size
 | 
			
		||||
              sizeString = `${tick.marker} ${tick.seriesName}: ${formatNumber(tick.data[1], this.locale, '1.2-2')} MB`;
 | 
			
		||||
              tooltip += `${tick.marker} ${tick.seriesName}: ${formatNumber(tick.data[1], this.locale, '1.2-2')} MB`;
 | 
			
		||||
            } else if (tick.seriesIndex === 1) { // Weight
 | 
			
		||||
              weightString = `${tick.marker} ${tick.seriesName}: ${formatNumber(tick.data[1], this.locale, '1.2-2')} MWU`;
 | 
			
		||||
              tooltip += `${tick.marker} ${tick.seriesName}: ${formatNumber(tick.data[1], this.locale, '1.2-2')} MWU`;
 | 
			
		||||
            }
 | 
			
		||||
            tooltip += `<br>`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          const date = new Date(ticks[0].data[0]).toLocaleDateString(this.locale, { year: 'numeric', month: 'short', day: 'numeric' });
 | 
			
		||||
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 18px">${date}</b><br>
 | 
			
		||||
            <span>${sizeString}</span><br>
 | 
			
		||||
            <span>${weightString}</span>`;
 | 
			
		||||
 | 
			
		||||
          if (['24h', '3d'].includes(this.timespan)) {
 | 
			
		||||
            tooltip += `<br><small>At block: ${ticks[0].data[2]}</small>`;
 | 
			
		||||
            tooltip += `<small>` + $localize`At block: ${ticks[0].data[2]}` + `</small>`;
 | 
			
		||||
          } else {
 | 
			
		||||
            tooltip += `<br><small>Around block ${ticks[0].data[2]}</small>`;
 | 
			
		||||
            tooltip += `<small>` + $localize`Around block: ${ticks[0].data[2]}` + `</small>`;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          return tooltip;
 | 
			
		||||
 | 
			
		||||
@ -141,7 +141,7 @@ export class HashrateChartComponent implements OnInit {
 | 
			
		||||
          color: 'grey',
 | 
			
		||||
          fontSize: 15
 | 
			
		||||
        },
 | 
			
		||||
        text: `Indexing in progess`,
 | 
			
		||||
        text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`,
 | 
			
		||||
        left: 'center',
 | 
			
		||||
        top: 'center'
 | 
			
		||||
      };
 | 
			
		||||
@ -207,7 +207,7 @@ export class HashrateChartComponent implements OnInit {
 | 
			
		||||
          const date = new Date(ticks[0].data[0]).toLocaleDateString(this.locale, { year: 'numeric', month: 'short', day: 'numeric' });
 | 
			
		||||
 | 
			
		||||
          return `
 | 
			
		||||
            <b style="color: white; margin-left: 18px">${date}</b><br>
 | 
			
		||||
            <b style="color: white; margin-left: 2px">${date}</b><br>
 | 
			
		||||
            <span>${hashrateString}</span><br>
 | 
			
		||||
            <span>${difficultyString}</span>
 | 
			
		||||
          `;
 | 
			
		||||
 | 
			
		||||
@ -155,7 +155,7 @@ export class HashrateChartPoolsComponent implements OnInit {
 | 
			
		||||
          color: 'grey',
 | 
			
		||||
          fontSize: 15
 | 
			
		||||
        },
 | 
			
		||||
        text: `Indexing in progess`,
 | 
			
		||||
        text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`,
 | 
			
		||||
        left: 'center',
 | 
			
		||||
        top: 'center',
 | 
			
		||||
      };
 | 
			
		||||
@ -186,7 +186,7 @@ export class HashrateChartPoolsComponent implements OnInit {
 | 
			
		||||
        borderColor: '#000',
 | 
			
		||||
        formatter: function (data) {
 | 
			
		||||
          const date = new Date(data[0].data[0]).toLocaleDateString(this.locale, { year: 'numeric', month: 'short', day: 'numeric' });
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 18px">${date}</b><br>`;
 | 
			
		||||
          let tooltip = `<b style="color: white; margin-left: 2px">${date}</b><br>`;
 | 
			
		||||
          data.sort((a, b) => b.data[1] - a.data[1]);
 | 
			
		||||
          for (const pool of data) {
 | 
			
		||||
            if (pool.data[1] > 0) {
 | 
			
		||||
 | 
			
		||||
@ -111,7 +111,7 @@ export class PoolComponent implements OnInit {
 | 
			
		||||
          color: 'grey',
 | 
			
		||||
          fontSize: 15
 | 
			
		||||
        },
 | 
			
		||||
        text: `Indexing in progress`,
 | 
			
		||||
        text: $localize`:@@23555386d8af1ff73f297e89dd4af3f4689fb9dd:Indexing blocks`,
 | 
			
		||||
        left: 'center',
 | 
			
		||||
        top: 'center'
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
@ -35,6 +35,7 @@ export class ApiDocsComponent implements OnInit {
 | 
			
		||||
    setTimeout( () => {
 | 
			
		||||
      if( this.route.snapshot.fragment ) {
 | 
			
		||||
        this.openEndpointContainer( this.route.snapshot.fragment );
 | 
			
		||||
        document.getElementById( this.route.snapshot.fragment ).scrollIntoView();
 | 
			
		||||
      }
 | 
			
		||||
      window.addEventListener('scroll', function() {
 | 
			
		||||
        that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
 | 
			
		||||
 | 
			
		||||
@ -13,18 +13,16 @@ export const formatterXAxis = (
 | 
			
		||||
      return date.toLocaleTimeString(locale, { hour: 'numeric', minute: 'numeric' });
 | 
			
		||||
    case '24h':
 | 
			
		||||
    case '3d':
 | 
			
		||||
      return date.toLocaleTimeString(locale, { weekday: 'short', hour: 'numeric', minute: 'numeric' });
 | 
			
		||||
    case '1w':
 | 
			
		||||
    case '1m':
 | 
			
		||||
    case '3m':
 | 
			
		||||
    case '6m':
 | 
			
		||||
    case '1y':
 | 
			
		||||
      return date.toLocaleTimeString(locale, { month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' });
 | 
			
		||||
      return date.toLocaleTimeString(locale, { month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' });
 | 
			
		||||
    case '2y':
 | 
			
		||||
    case '3y':
 | 
			
		||||
      return date.toLocaleDateString(locale, { year: 'numeric', month: 'short', day: 'numeric' });
 | 
			
		||||
    case 'all':
 | 
			
		||||
      return date.toLocaleDateString(locale, { year: 'numeric', month: 'short' });
 | 
			
		||||
      return date.toLocaleDateString(locale, { year: 'numeric', month: 'long', day: 'numeric' });
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user