mirror of
https://github.com/mempool/mempool.git
synced 2025-09-27 18:37:08 +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];
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user