Liquid always uses esplora (regression of #2039)
This commit is contained in:
parent
b8b50b552e
commit
0093eab269
@ -527,13 +527,12 @@ class Blocks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let block = await bitcoinClient.getBlock(hash);
|
|
||||||
|
|
||||||
// Not Bitcoin network, return the block as it
|
// Not Bitcoin network, return the block as it
|
||||||
if (['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) === false) {
|
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);
|
block = prepareBlock(block);
|
||||||
|
|
||||||
// Bitcoin network, add our custom data on top
|
// Bitcoin network, add our custom data on top
|
||||||
@ -547,8 +546,8 @@ class Blocks {
|
|||||||
return blockExtended;
|
return blockExtended;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async $getStrippedBlockTransactions(hash: string, skipMemoryCache: boolean = false,
|
public async $getStrippedBlockTransactions(hash: string, skipMemoryCache = false,
|
||||||
skipDBLookup: boolean = false): Promise<TransactionStripped[]>
|
skipDBLookup = false): Promise<TransactionStripped[]>
|
||||||
{
|
{
|
||||||
if (skipMemoryCache === false) {
|
if (skipMemoryCache === false) {
|
||||||
// Check the memory cache
|
// Check the memory cache
|
||||||
|
@ -172,7 +172,7 @@ export class Common {
|
|||||||
|
|
||||||
static indexingEnabled(): boolean {
|
static indexingEnabled(): boolean {
|
||||||
return (
|
return (
|
||||||
['mainnet', 'testnet', 'signet', 'regtest'].includes(config.MEMPOOL.NETWORK) &&
|
['mainnet', 'testnet', 'signet'].includes(config.MEMPOOL.NETWORK) &&
|
||||||
config.DATABASE.ENABLED === true &&
|
config.DATABASE.ENABLED === true &&
|
||||||
config.MEMPOOL.INDEXING_BLOCKS_AMOUNT !== 0
|
config.MEMPOOL.INDEXING_BLOCKS_AMOUNT !== 0
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user