mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-20 14:54:47 -07:00
global: fixes
This commit is contained in:
@@ -57,7 +57,7 @@ fn main() -> Result<()> {
|
||||
|
||||
let mut first: Option<RunStats> = None;
|
||||
for &p in PARSER_COUNTS {
|
||||
let stats = bench(REPEATS, || reader.after_with(anchor.clone(), p))?;
|
||||
let stats = bench(REPEATS, || reader.after_with(anchor, p))?;
|
||||
print_row(n, p, &stats);
|
||||
if let Some(baseline) = &first {
|
||||
sanity_check(n, baseline, &stats);
|
||||
|
||||
@@ -70,10 +70,12 @@ impl Reader {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn client(&self) -> &Client {
|
||||
&self.0.client
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn blocks_dir(&self) -> &Path {
|
||||
&self.0.blocks_dir
|
||||
}
|
||||
@@ -140,9 +142,9 @@ impl Reader {
|
||||
) -> Result<Receiver<Result<ReadBlock>>> {
|
||||
let tip = self.0.client.get_last_height()?;
|
||||
if end > tip {
|
||||
return Err(Error::OutOfRange(format!(
|
||||
"range end {end} is past current tip {tip}"
|
||||
)));
|
||||
return Err(Error::OutOfRange(
|
||||
format!("range end {end} is past current tip {tip}").into(),
|
||||
));
|
||||
}
|
||||
let canonical = CanonicalRange::between(&self.0.client, start, end)?;
|
||||
pipeline::spawn(self.0.clone(), canonical, parser_threads)
|
||||
|
||||
Reference in New Issue
Block a user