From 1a81feba03fea268bf2142dddde0eb37313f3fea Mon Sep 17 00:00:00 2001 From: nicolas <48695862+merklefruit@users.noreply.github.com> Date: Sun, 20 Oct 2024 13:49:12 +0200 Subject: [PATCH] chore: fetch block with tx_hashes instead of full objects in standalone ctx --- crates/rollup/src/driver/context/standalone.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/rollup/src/driver/context/standalone.rs b/crates/rollup/src/driver/context/standalone.rs index b87e3d5..a62e816 100644 --- a/crates/rollup/src/driver/context/standalone.rs +++ b/crates/rollup/src/driver/context/standalone.rs @@ -69,7 +69,7 @@ impl StandaloneHeraContext { let mut stream = new_block_hashes.into_stream(); while let Some(hashes) = stream.next().await { for hash in hashes { - match client.get_block_by_hash(hash, true.into()).await { + match client.get_block_by_hash(hash, false.into()).await { Ok(Some(block)) => { if let Err(e) = new_block_tx.try_send(block) { error!("Failed to send new block to channel: {:?}", e); @@ -111,7 +111,9 @@ impl StandaloneHeraContext { hash = block.header.hash; // Every time we get a new hash, fetch the full block - match client.get_block_by_hash(block.header.hash, true.into()).await + match client + .get_block_by_hash(block.header.hash, false.into()) + .await { Ok(Some(full_block)) => { if let Err(e) = new_block_tx.try_send(full_block) {