mirror of
https://github.com/mempool/mempool.git
synced 2025-04-23 23:10:45 +02:00
[indexing] initialize currentSha
before hiting github
This commit is contained in:
parent
a1fb50a170
commit
12f368ca6d
@ -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…
x
Reference in New Issue
Block a user