Only insert hashrate states for bitcoin
This commit is contained in:
parent
87405ec4a5
commit
cd12e9bde9
@ -293,6 +293,7 @@ class DatabaseMigration {
|
||||
*/
|
||||
private getMigrationQueriesFromVersion(version: number): string[] {
|
||||
const queries: string[] = [];
|
||||
const isBitcoin = ['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK);
|
||||
|
||||
if (version < 1) {
|
||||
if (config.MEMPOOL.NETWORK !== 'liquid' && config.MEMPOOL.NETWORK !== 'liquidtestnet') {
|
||||
@ -300,11 +301,11 @@ class DatabaseMigration {
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 7) {
|
||||
if (version < 7 && isBitcoin === true) {
|
||||
queries.push(`INSERT INTO state(name, number, string) VALUES ('last_hashrates_indexing', 0, NULL)`);
|
||||
}
|
||||
|
||||
if (version < 9) {
|
||||
if (version < 9 && isBitcoin === true) {
|
||||
queries.push(`INSERT INTO state(name, number, string) VALUES ('last_weekly_hashrates_indexing', 0, NULL)`);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user