Liquid always uses esplora (regression of #2039)

This commit is contained in:
nymkappa 2022-07-11 08:41:28 +02:00
parent b8b50b552e
commit 0093eab269
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 5 additions and 6 deletions

View File

@ -527,13 +527,12 @@ class Blocks {
}
}
let block = await bitcoinClient.getBlock(hash);
// Not Bitcoin network, return the block as it
if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false) {
return block;
return await bitcoinApi.$getBlock(hash);
}
let block = await bitcoinClient.getBlock(hash);
block = prepareBlock(block);
// Bitcoin network, add our custom data on top
@ -547,8 +546,8 @@ class Blocks {
return blockExtended;
}
public async $getStrippedBlockTransactions(hash: string, skipMemoryCache: boolean = false,
skipDBLookup: boolean = false): Promise<TransactionStripped[]>
public async $getStrippedBlockTransactions(hash: string, skipMemoryCache = false,
skipDBLookup = false): Promise<TransactionStripped[]>
{
if (skipMemoryCache === false) {
// Check the memory cache

View File

@ -172,7 +172,7 @@ export class Common {
static indexingEnabled(): boolean {
return (
['mainnet', 'testnet', 'signet', 'regtest'].includes(config.MEMPOOL.NETWORK) &&
['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) &&
config.DATABASE.ENABLED === true &&
config.MEMPOOL.INDEXING_BLOCKS_AMOUNT !== 0
);