mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 07:09:59 -07:00
global: snapshot
This commit is contained in:
@@ -20,11 +20,7 @@ impl Query {
|
||||
return Err(Error::OutOfRange("Block height out of range".into()));
|
||||
}
|
||||
|
||||
let position = computer
|
||||
.positions
|
||||
.block_position
|
||||
.collect_one(height)
|
||||
.unwrap();
|
||||
let position = computer.positions.block.collect_one(height).unwrap();
|
||||
let size = indexer.vecs.blocks.total_size.collect_one(height).unwrap();
|
||||
|
||||
reader.read_raw_bytes(position, *size as usize)
|
||||
|
||||
@@ -226,7 +226,7 @@ impl Query {
|
||||
.first_txinindex
|
||||
.collect_one(txindex)
|
||||
.unwrap();
|
||||
let position = computer.positions.tx_position.collect_one(txindex).unwrap();
|
||||
let position = computer.positions.tx.collect_one(txindex).unwrap();
|
||||
|
||||
// Get block info for status
|
||||
let block_hash = indexer.vecs.blocks.blockhash.read_once(height)?;
|
||||
@@ -344,7 +344,7 @@ impl Query {
|
||||
.total_size
|
||||
.collect_one(txindex)
|
||||
.unwrap();
|
||||
let position = computer.positions.tx_position.collect_one(txindex).unwrap();
|
||||
let position = computer.positions.tx.collect_one(txindex).unwrap();
|
||||
|
||||
let buffer = reader.read_raw_bytes(position, *total_size as usize)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user