mirror of
https://github.com/mempool/mempool.git
synced 2025-02-22 22:25:34 +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;
|
this.lastRun = now;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (config.DATABASE.ENABLED === true) {
|
||||||
|
this.currentSha = await this.getShaFromDb();
|
||||||
|
}
|
||||||
|
|
||||||
const githubSha = await this.fetchPoolsSha(); // Fetch pools-v2.json sha from github
|
const githubSha = await this.fetchPoolsSha(); // Fetch pools-v2.json sha from github
|
||||||
if (githubSha === null) {
|
if (githubSha === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.DATABASE.ENABLED === true) {
|
|
||||||
this.currentSha = await this.getShaFromDb();
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.debug(`pools-v2.json sha | Current: ${this.currentSha} | Github: ${githubSha}`, this.tag);
|
logger.debug(`pools-v2.json sha | Current: ${this.currentSha} | Github: ${githubSha}`, this.tag);
|
||||||
if (this.currentSha !== null && this.currentSha === githubSha) {
|
if (this.currentSha !== null && this.currentSha === githubSha) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue