Skip to content

Commit

Permalink
Disable tx refetch logic (#6384)
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane authored Feb 5, 2024
1 parent 7213533 commit c29af0c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/net/network/src/transactions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ pub struct TransactionsManager<Pool> {
transaction_events: UnboundedMeteredReceiver<NetworkTransactionEvent>,
/// TransactionsManager metrics
metrics: TransactionsManagerMetrics,
/// Configures wether or not to handle hashes from an announcement that didn't fit in the
/// request. If set to `false`, hashes that don't fit will be dropped.
enable_tx_refetch: bool,
}

impl<Pool: TransactionPool> TransactionsManager<Pool> {
Expand Down Expand Up @@ -261,6 +264,7 @@ impl<Pool: TransactionPool> TransactionsManager<Pool> {
NETWORK_POOL_TRANSACTIONS_SCOPE,
),
metrics: Default::default(),
enable_tx_refetch: false,
}
}
}
Expand Down Expand Up @@ -1133,8 +1137,10 @@ where
some_ready = true;
}

// try drain buffered transactions
this.request_buffered_hashes();
if this.enable_tx_refetch {
// try drain buffered transactions
this.request_buffered_hashes();
}
this.update_request_metrics();

// Advance all imports
Expand Down

0 comments on commit c29af0c

Please sign in to comment.