mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-02 06:48:59 -07:00
global: veccached change
This commit is contained in:
@@ -52,7 +52,7 @@ impl Query {
|
||||
if height > max_height {
|
||||
return Err(Error::OutOfRange("Block height out of range".into()));
|
||||
}
|
||||
Ok(self.indexer().vecs.blocks.blockhash.read_once(height)?)
|
||||
self.indexer().vecs.blocks.blockhash.get(height).data()
|
||||
}
|
||||
|
||||
pub fn blocks(&self, start_height: Option<Height>) -> Result<Vec<BlockInfo>> {
|
||||
@@ -220,7 +220,7 @@ impl Query {
|
||||
.block
|
||||
.sats
|
||||
.collect_range_at(begin, end);
|
||||
let prices = computer.prices.cached_spot_usd.collect_range_at(begin, end);
|
||||
let prices = computer.prices.spot.usd.height.collect_range_at(begin, end);
|
||||
let output_volumes = computer
|
||||
.mining
|
||||
.rewards
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use brk_error::Result;
|
||||
use brk_error::{OptionData, Result};
|
||||
use brk_types::{BlockHash, BlockStatus, Height};
|
||||
use vecdb::AnyVec;
|
||||
|
||||
@@ -25,7 +25,8 @@ impl Query {
|
||||
.vecs
|
||||
.blocks
|
||||
.blockhash
|
||||
.read_once(height.incremented())?,
|
||||
.get(height.incremented())
|
||||
.data()?,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user