mirror of
https://github.com/mempool/mempool.git
synced 2025-02-21 22:11:51 +01:00
[indexing] initialize currentSha
before hiting github
This commit is contained in:
parent
b5d5231bc1
commit
2b79fd438d
1 changed files with 4 additions and 4 deletions
|
@ -45,15 +45,15 @@ class PoolsUpdater {
|
|||
this.lastRun = now;
|
||||
|
||||
try {
|
||||
if (config.DATABASE.ENABLED === true) {
|
||||
this.currentSha = await this.getShaFromDb();
|
||||
}
|
||||
|
||||
const githubSha = await this.fetchPoolsSha(); // Fetch pools-v2.json sha from github
|
||||
if (githubSha === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.DATABASE.ENABLED === true) {
|
||||
this.currentSha = await this.getShaFromDb();
|
||||
}
|
||||
|
||||
logger.debug(`pools-v2.json sha | Current: ${this.currentSha} | Github: ${githubSha}`, this.tag);
|
||||
if (this.currentSha !== null && this.currentSha === githubSha) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue