Skip to content

Commit

Permalink
Skip seen transactions and solutions instead of bailing
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukaMa committed Mar 4, 2024
1 parent 8be6ac9 commit 910784e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions node/router/src/inbound.rs
Expand Up @@ -210,7 +210,8 @@ pub trait Inbound<N: Network>: Reading + Outbound<N> {
let seen_before = self.router().cache.insert_inbound_solution(peer_ip, message.solution_id).is_some();
// Determine whether to propagate the solution.
if seen_before {
bail!("Skipping 'UnconfirmedSolution' from '{peer_ip}'")
trace!("Skipping 'UnconfirmedSolution' from '{peer_ip}'");
return Ok(());
}
// Perform the deferred non-blocking deserialization of the solution.
let solution = match message.solution.deserialize().await {
Expand All @@ -235,7 +236,8 @@ pub trait Inbound<N: Network>: Reading + Outbound<N> {
self.router().cache.insert_inbound_transaction(peer_ip, message.transaction_id).is_some();
// Determine whether to propagate the transaction.
if seen_before {
bail!("Skipping 'UnconfirmedTransaction' from '{peer_ip}'")
trace!("Skipping 'UnconfirmedTransaction' from '{peer_ip}'");
return Ok(());
}
// Perform the deferred non-blocking deserialization of the transaction.
let transaction = match message.transaction.deserialize().await {
Expand Down

0 comments on commit 910784e

Please sign in to comment.