get blocks from esplora for cpfp indexer

This commit is contained in:
Mononaut
2022-11-29 11:37:51 +09:00
parent f2ad184d1f
commit 6d6dd09d11
4 changed files with 7 additions and 7 deletions

View File

@@ -744,8 +744,8 @@ class Blocks {
let transactions;
if (Common.blocksSummariesIndexingEnabled()) {
transactions = await this.$getStrippedBlockTransactions(hash);
const rawBlock = await bitcoinClient.getBlock(hash, 0);
const block = Block.fromHex(rawBlock);
const rawBlock = await bitcoinApi.$getRawBlock(hash);
const block = Block.fromBuffer(rawBlock);
const txMap = {};
for (const tx of block.transactions || []) {
txMap[tx.getId()] = tx;