Skip to content

Commit

Permalink
chore(trie): parallel storage proof should not error on closed recv
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Dec 19, 2024
1 parent ef033ab commit 07a4f26
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/trie/parallel/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use reth_trie::{
use reth_trie_common::proof::ProofRetainer;
use reth_trie_db::{DatabaseHashedCursorFactory, DatabaseTrieCursorFactory};
use std::sync::Arc;
use tracing::{debug, error};
use tracing::debug;

#[cfg(feature = "metrics")]
use crate::metrics::ParallelStateRootMetrics;
Expand Down Expand Up @@ -151,8 +151,11 @@ where
.storage_multiproof(target_slots)
.map_err(|e| ParallelStateRootError::Other(e.to_string()))
})();
// We can have the receiver dropped before we send, because we still calculate
// storage proofs for deleted accounts, but do not actually walk over them in
// `account_node_iter` below.
if let Err(err) = tx.send(result) {
error!(target: "trie::parallel", ?hashed_address, err_content = ?err.0, "Failed to send proof result");
debug!(target: "trie::parallel", ?hashed_address, err_content = ?err.0, "Failed to send proof result");
}
});
storage_proofs.insert(hashed_address, rx);
Expand Down

0 comments on commit 07a4f26

Please sign in to comment.