Skip to content

Commit

Permalink
chore: fetch block with tx_hashes instead of full objects in standalo…
Browse files Browse the repository at this point in the history
…ne ctx
  • Loading branch information
merklefruit committed Oct 20, 2024
1 parent 529cadc commit 1a81feb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/rollup/src/driver/context/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 1a81feb

Please sign in to comment.