only query blocks_audits on bitcoin networks

This commit is contained in:
Mononaut 2022-11-28 14:26:28 +09:00
parent b0e3022ddb
commit 2290f98011
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -652,7 +652,10 @@ class Blocks {
}
public async $getBlockAuditSummary(hash: string): Promise<any> {
let summary = await BlocksAuditsRepository.$getBlockAudit(hash);
let summary;
if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK)) {
summary = await BlocksAuditsRepository.$getBlockAudit(hash);
}
// fallback to non-audited transaction summary
if (!summary?.transactions?.length) {