From 57fb305452446587d49299d47387522e87bc3b2b Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sun, 26 Feb 2023 13:54:43 +0900 Subject: [PATCH] Update missing "pools.json" -> "pools-v2.json" --- backend/README.md | 2 +- backend/mempool-config.sample.json | 2 +- backend/src/api/pools-parser.ts | 4 ++-- backend/src/repositories/PoolsRepository.ts | 2 +- docker/README.md | 4 ++-- docker/backend/start.sh | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/README.md b/backend/README.md index d00dc1812..2024e00b9 100644 --- a/backend/README.md +++ b/backend/README.md @@ -160,7 +160,7 @@ npm install -g ts-node nodemon Then, run the watcher: ``` -nodemon src/index.ts --ignore cache/ --ignore pools.json +nodemon src/index.ts --ignore cache/ ``` `nodemon` should be in npm's global binary folder. If needed, you can determine where that is with `npm -g bin`. diff --git a/backend/mempool-config.sample.json b/backend/mempool-config.sample.json index 5ebb25ea5..2369b64b5 100644 --- a/backend/mempool-config.sample.json +++ b/backend/mempool-config.sample.json @@ -22,7 +22,7 @@ "USER_AGENT": "mempool", "STDOUT_LOG_MIN_PRIORITY": "debug", "AUTOMATIC_BLOCK_REINDEXING": false, - "POOLS_JSON_URL": "https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json", + "POOLS_JSON_URL": "https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json", "POOLS_JSON_TREE_URL": "https://api.github.com/repos/mempool/mining-pools/git/trees/master", "AUDIT": false, "ADVANCED_GBT_AUDIT": false, diff --git a/backend/src/api/pools-parser.ts b/backend/src/api/pools-parser.ts index 4e67ce98b..b34dcb7b8 100644 --- a/backend/src/api/pools-parser.ts +++ b/backend/src/api/pools-parser.ts @@ -73,7 +73,7 @@ class PoolsParser { } } - logger.info('Mining pools.json import completed'); + logger.info('Mining pools-v2.json import completed'); } /** @@ -115,7 +115,7 @@ class PoolsParser { return; } - // Get oldest blocks mined by the pool and assume pools.json updates only concern most recent years + // Get oldest blocks mined by the pool and assume pools-v2.json updates only concern most recent years // Ignore early days of Bitcoin as there were no mining pool yet const [oldestPoolBlock]: any[] = await DB.query(` SELECT height diff --git a/backend/src/repositories/PoolsRepository.ts b/backend/src/repositories/PoolsRepository.ts index 63bddd497..236955d65 100644 --- a/backend/src/repositories/PoolsRepository.ts +++ b/backend/src/repositories/PoolsRepository.ts @@ -99,7 +99,7 @@ class PoolsRepository { rows[0].regexes = JSON.parse(rows[0].regexes); } if (['testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) { - rows[0].addresses = []; // pools.json only contains mainnet addresses + rows[0].addresses = []; // pools-v2.json only contains mainnet addresses } else if (parse) { rows[0].addresses = JSON.parse(rows[0].addresses); } diff --git a/docker/README.md b/docker/README.md index 168d4b1fa..468d8069b 100644 --- a/docker/README.md +++ b/docker/README.md @@ -102,11 +102,11 @@ Below we list all settings from `mempool-config.json` and the corresponding over "MEMPOOL_BLOCKS_AMOUNT": 8, "BLOCKS_SUMMARIES_INDEXING": false, "USE_SECOND_NODE_FOR_MINFEE": false, - "EXTERNAL_ASSETS": ["https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json"], + "EXTERNAL_ASSETS": [], "STDOUT_LOG_MIN_PRIORITY": "info", "INDEXING_BLOCKS_AMOUNT": false, "AUTOMATIC_BLOCK_REINDEXING": false, - "POOLS_JSON_URL": "https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json", + "POOLS_JSON_URL": "https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json", "POOLS_JSON_TREE_URL": "https://api.github.com/repos/mempool/mining-pools/git/trees/master", "ADVANCED_GBT_AUDIT": false, "ADVANCED_GBT_MEMPOOL": false, diff --git a/docker/backend/start.sh b/docker/backend/start.sh index 3ee542892..ee5069386 100755 --- a/docker/backend/start.sh +++ b/docker/backend/start.sh @@ -24,7 +24,7 @@ __MEMPOOL_USER_AGENT__=${MEMPOOL_USER_AGENT:=mempool} __MEMPOOL_STDOUT_LOG_MIN_PRIORITY__=${MEMPOOL_STDOUT_LOG_MIN_PRIORITY:=info} __MEMPOOL_INDEXING_BLOCKS_AMOUNT__=${MEMPOOL_INDEXING_BLOCKS_AMOUNT:=false} __MEMPOOL_AUTOMATIC_BLOCK_REINDEXING__=${MEMPOOL_AUTOMATIC_BLOCK_REINDEXING:=false} -__MEMPOOL_POOLS_JSON_URL__=${MEMPOOL_POOLS_JSON_URL:=https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json} +__MEMPOOL_POOLS_JSON_URL__=${MEMPOOL_POOLS_JSON_URL:=https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json} __MEMPOOL_POOLS_JSON_TREE_URL__=${MEMPOOL_POOLS_JSON_TREE_URL:=https://api.github.com/repos/mempool/mining-pools/git/trees/master} __MEMPOOL_AUDIT__=${MEMPOOL_AUDIT:=false} __MEMPOOL_ADVANCED_GBT_AUDIT__=${MEMPOOL_ADVANCED_GBT_AUDIT:=false}