mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-21 16:08:10 -07:00
website_next: part 8
This commit is contained in:
@@ -12,16 +12,23 @@ export async function loadBlockPreview(block) {
|
||||
const start = /** @type {number} */ (firstTxIndex);
|
||||
const end = start + block.txCount;
|
||||
const tx = brk.series.transactions;
|
||||
const indexes = brk.series.indexes.txIndex;
|
||||
const [
|
||||
txids,
|
||||
versions,
|
||||
weights,
|
||||
feeRates,
|
||||
rbfs,
|
||||
inputCounts,
|
||||
outputCounts,
|
||||
] = await Promise.all([
|
||||
tx.raw.txid.by.tx_index.slice(start, end).fetch(),
|
||||
tx.raw.txVersion.by.tx_index.slice(start, end).fetch(),
|
||||
tx.size.weight.txIndex.by.tx_index.slice(start, end).fetch(),
|
||||
tx.fees.feeRate.by.tx_index.slice(start, end).fetch(),
|
||||
tx.raw.isExplicitlyRbf.by.tx_index.slice(start, end).fetch(),
|
||||
indexes.inputCount.by.tx_index.slice(start, end).fetch(),
|
||||
indexes.outputCount.by.tx_index.slice(start, end).fetch(),
|
||||
]);
|
||||
|
||||
return txids.data.map((txid, index) => ({
|
||||
@@ -29,5 +36,8 @@ export async function loadBlockPreview(block) {
|
||||
version: versions.data[index],
|
||||
weight: weights.data[index],
|
||||
feeRate: feeRates.data[index],
|
||||
rbf: rbfs.data[index],
|
||||
inputCount: inputCounts.data[index],
|
||||
outputCount: outputCounts.data[index],
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user