Fixes post rebase
This commit is contained in:
		
							parent
							
								
									6e61de3a96
								
							
						
					
					
						commit
						e3696bca61
					
				@ -25,8 +25,7 @@
 | 
				
			|||||||
    "build": "npm run tsc",
 | 
					    "build": "npm run tsc",
 | 
				
			||||||
    "start": "node --max-old-space-size=2048 dist/index.js",
 | 
					    "start": "node --max-old-space-size=2048 dist/index.js",
 | 
				
			||||||
    "start-production": "node --max-old-space-size=4096 dist/index.js",
 | 
					    "start-production": "node --max-old-space-size=4096 dist/index.js",
 | 
				
			||||||
    "test": "echo \"Error: no test specified\" && exit 1",
 | 
					    "test": "echo \"Error: no test specified\" && exit 1"
 | 
				
			||||||
    "migrate-pools": "npm run tsc ; node dist/api/pools-parser.js"
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@mempool/bitcoin": "^3.0.3",
 | 
					    "@mempool/bitcoin": "^3.0.3",
 | 
				
			||||||
 | 
				
			|||||||
@ -353,17 +353,6 @@ class DatabaseMigration {
 | 
				
			|||||||
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`;
 | 
					    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private getCreatePoolsTableQuery(): string {
 | 
					 | 
				
			||||||
    return `CREATE TABLE IF NOT EXISTS pools (
 | 
					 | 
				
			||||||
      id int(11) NOT NULL AUTO_INCREMENT,
 | 
					 | 
				
			||||||
      name varchar(50) NOT NULL,
 | 
					 | 
				
			||||||
      link varchar(255) NOT NULL,
 | 
					 | 
				
			||||||
      addresses text NOT NULL,
 | 
					 | 
				
			||||||
      regexes text NOT NULL,
 | 
					 | 
				
			||||||
      PRIMARY KEY (id)
 | 
					 | 
				
			||||||
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  private getCreateBlocksTableQuery(): string {
 | 
					  private getCreateBlocksTableQuery(): string {
 | 
				
			||||||
    return `CREATE TABLE IF NOT EXISTS blocks (
 | 
					    return `CREATE TABLE IF NOT EXISTS blocks (
 | 
				
			||||||
      height int(11) unsigned NOT NULL,
 | 
					      height int(11) unsigned NOT NULL,
 | 
				
			||||||
 | 
				
			|||||||
@ -89,6 +89,7 @@ class Server {
 | 
				
			|||||||
      await checkDbConnection();
 | 
					      await checkDbConnection();
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
        await databaseMigration.$initializeOrMigrateDatabase();
 | 
					        await databaseMigration.$initializeOrMigrateDatabase();
 | 
				
			||||||
 | 
					        await poolsParser.migratePoolsJson();
 | 
				
			||||||
      } catch (e) {
 | 
					      } catch (e) {
 | 
				
			||||||
        throw new Error(e instanceof Error ? e.message : 'Error');
 | 
					        throw new Error(e instanceof Error ? e.message : 'Error');
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
@ -371,22 +371,19 @@ describe('Mainnet', () => {
 | 
				
			|||||||
      cy.get('.blockchain-wrapper').should('not.visible');
 | 
					      cy.get('.blockchain-wrapper').should('not.visible');
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        it('loads genesis block and click on the arrow left', () => {
 | 
					    it('loads genesis block and click on the arrow left', () => {
 | 
				
			||||||
          cy.viewport('macbook-16');
 | 
					      cy.viewport('macbook-16');
 | 
				
			||||||
          cy.visit('/block/0');
 | 
					      cy.visit('/block/0');
 | 
				
			||||||
          cy.waitForSkeletonGone();
 | 
					      cy.waitForSkeletonGone();
 | 
				
			||||||
          cy.waitForPageIdle();
 | 
					      cy.waitForPageIdle();
 | 
				
			||||||
          cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
 | 
					      cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
 | 
				
			||||||
          cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
 | 
					      cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
 | 
				
			||||||
          cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').click().then(() => {
 | 
					      cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').click().then(() => {
 | 
				
			||||||
            cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
 | 
					        cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
 | 
				
			||||||
            cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
 | 
					        cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    it('loads skeleton when changes between networks', () => {
 | 
					    it('loads skeleton when changes between networks', () => {
 | 
				
			||||||
      cy.visit('/');
 | 
					      cy.visit('/');
 | 
				
			||||||
      cy.waitForSkeletonGone();
 | 
					      cy.waitForSkeletonGone();
 | 
				
			||||||
@ -417,11 +414,11 @@ describe('Mainnet', () => {
 | 
				
			|||||||
      cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
 | 
					      cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it('loads the blocks screen', () => {
 | 
					    it('loads the pools screen', () => {
 | 
				
			||||||
      cy.visit('/');
 | 
					      cy.visit('/');
 | 
				
			||||||
      cy.waitForSkeletonGone();
 | 
					      cy.waitForSkeletonGone();
 | 
				
			||||||
      cy.get('#btn-blocks').click().then(() => {
 | 
					      cy.get('#btn-pools').click().then(() => {
 | 
				
			||||||
        cy.waitForPageIdle();
 | 
					        cy.wait(1000);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -10,6 +10,7 @@
 | 
				
			|||||||
  "NGINX_PROTOCOL": "http",
 | 
					  "NGINX_PROTOCOL": "http",
 | 
				
			||||||
  "NGINX_HOSTNAME": "127.0.0.1",
 | 
					  "NGINX_HOSTNAME": "127.0.0.1",
 | 
				
			||||||
  "NGINX_PORT": "80",
 | 
					  "NGINX_PORT": "80",
 | 
				
			||||||
 | 
					  "BLOCK_WEIGHT_UNITS": 4000000,
 | 
				
			||||||
  "MEMPOOL_BLOCKS_AMOUNT": 8,
 | 
					  "MEMPOOL_BLOCKS_AMOUNT": 8,
 | 
				
			||||||
  "BASE_MODULE": "mempool",
 | 
					  "BASE_MODULE": "mempool",
 | 
				
			||||||
  "MEMPOOL_WEBSITE_URL": "https://mempool.space",
 | 
					  "MEMPOOL_WEBSITE_URL": "https://mempool.space",
 | 
				
			||||||
 | 
				
			|||||||
@ -72,8 +72,6 @@ export interface PoolsStats {
 | 
				
			|||||||
  pools: SinglePoolStats[];
 | 
					  pools: SinglePoolStats[];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface ITranslators { [language: string]: string; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export interface MiningStats {
 | 
					export interface MiningStats {
 | 
				
			||||||
  lastEstimatedHashrate: string,
 | 
					  lastEstimatedHashrate: string,
 | 
				
			||||||
  blockCount: number,
 | 
					  blockCount: number,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user