mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
fix: Fix --debug-cutoff-height semantics
NOTE: This is a debug feature not on by default. The original intention of it was limiting the highest block number. But it was instead enforcing the starting block number for fetching, leading to block progression.
This commit is contained in:
@ -81,13 +81,13 @@ impl BlockPoller {
|
||||
.await
|
||||
.ok_or(eyre::eyre!("Failed to find latest block number"))?;
|
||||
|
||||
if let Some(debug_cutoff_height) = debug_cutoff_height &&
|
||||
next_block_number > debug_cutoff_height
|
||||
loop {
|
||||
if let Some(debug_cutoff_height) = debug_cutoff_height
|
||||
&& next_block_number > debug_cutoff_height
|
||||
{
|
||||
next_block_number = debug_cutoff_height;
|
||||
}
|
||||
|
||||
loop {
|
||||
match block_source.collect_block(next_block_number).await {
|
||||
Ok(block) => {
|
||||
block_tx.send((next_block_number, block)).await?;
|
||||
|
||||
Reference in New Issue
Block a user