mirror of
https://github.com/mempool/mempool.git
synced 2025-10-10 18:22:53 +02:00
[lightning] make sure tx idx is present in block
This commit is contained in:
@@ -103,6 +103,10 @@ class FundingTxFetcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const txid = block.tx[txIdx];
|
const txid = block.tx[txIdx];
|
||||||
|
if (!txid) {
|
||||||
|
logger.debug(`Cannot cache ${channelId} funding tx. TX index ${txIdx} does not exist in block ${block.hash ?? block.id}`, logger.tags.ln);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
const rawTx = await bitcoinClient.getRawTransaction(txid);
|
const rawTx = await bitcoinClient.getRawTransaction(txid);
|
||||||
const tx = await bitcoinClient.decodeRawTransaction(rawTx);
|
const tx = await bitcoinClient.decodeRawTransaction(rawTx);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user