Skip to content

Commit 529d643

Browse files
committed
fix(block): avoid prevout fan-out for tx values
1 parent b008dd7 commit 529d643

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

server/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ app.get('/api/block/:hashOrHeight', async (req, res) => {
248248
txValues = await Promise.all(
249249
txids.map(async (txid) => {
250250
try {
251-
const tx = await blockCache.getTransaction(txid, network, true)
251+
const tx = await blockCache.getTransaction(txid, network, true, {
252+
prevoutLookupBudget: { remaining: 0 },
253+
})
252254
const vout = (tx as { vout?: Array<{ value?: number }> }).vout
253255
if (!Array.isArray(vout)) return null
254256
return vout.reduce((sum, o) => sum + (Number(o.value) || 0), 0)

0 commit comments

Comments
 (0)