chore: include err in log (#18119)

This commit is contained in:
Matthias Seitz
2025-08-28 10:44:16 +02:00
committed by GitHub
parent 87a4949f5c
commit 8a4b53361c
2 changed files with 12 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ use alloy_provider::Provider;
use alloy_rpc_types_engine::ForkchoiceState;
use clap::Parser;
use csv::Writer;
use eyre::Context;
use humantime::parse_duration;
use reth_cli_runner::CliContext;
use reth_node_core::args::BenchmarkArgs;
@@ -50,7 +51,11 @@ impl Command {
let (sender, mut receiver) = tokio::sync::mpsc::channel(1000);
tokio::task::spawn(async move {
while benchmark_mode.contains(next_block) {
let block_res = block_provider.get_block_by_number(next_block.into()).full().await;
let block_res = block_provider
.get_block_by_number(next_block.into())
.full()
.await
.wrap_err_with(|| format!("Failed to fetch block by number {next_block}"));
let block = block_res.unwrap().unwrap();
let header = block.header.clone();

View File

@@ -13,6 +13,7 @@ use crate::{
use alloy_provider::Provider;
use clap::Parser;
use csv::Writer;
use eyre::Context;
use reth_cli_runner::CliContext;
use reth_node_core::args::BenchmarkArgs;
use std::time::{Duration, Instant};
@@ -43,7 +44,11 @@ impl Command {
let (sender, mut receiver) = tokio::sync::mpsc::channel(1000);
tokio::task::spawn(async move {
while benchmark_mode.contains(next_block) {
let block_res = block_provider.get_block_by_number(next_block.into()).full().await;
let block_res = block_provider
.get_block_by_number(next_block.into())
.full()
.await
.wrap_err_with(|| format!("Failed to fetch block by number {next_block}"));
let block = block_res.unwrap().unwrap();
let header = block.header.clone();