[lightning] make sure tx idx is present in block

This commit is contained in:
nymkappa
2025-05-08 13:07:05 +02:00
parent 13b4126f9b
commit c67c2571b7

View File

@@ -103,6 +103,10 @@ class FundingTxFetcher {
}
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 tx = await bitcoinClient.decodeRawTransaction(rawTx);