global: fixes

This commit is contained in:
nym21
2026-05-04 16:57:21 +02:00
parent 4663d13194
commit dc32bd480f
121 changed files with 2996 additions and 2165 deletions

View File

@@ -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);

View File

@@ -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)