Skip to content

Commit

Permalink
refactor(fetcher): set `DEFAULT_MARGINAL_COUNT_HASHES_GET_POOLED_TRAN…
Browse files Browse the repository at this point in the history
…SACTIONS_REQUEST`(8) as capacity for hashes to request
  • Loading branch information
Elvis339 committed Dec 12, 2024
1 parent 400bf8a commit dc2af71
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/net/network/src/transactions/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,7 @@ impl<N: NetworkPrimitives> TransactionFetcher<N> {
peers: &HashMap<PeerId, PeerMetadata<N>>,
has_capacity_wrt_pending_pool_imports: impl Fn(usize) -> bool,
) {
let init_capacity_req = approx_capacity_get_pooled_transactions_req_eth68(&self.info);
let mut hashes_to_request = RequestTxHashes::with_capacity(init_capacity_req / 2);
let mut hashes_to_request = RequestTxHashes::with_capacity(DEFAULT_MARGINAL_COUNT_HASHES_GET_POOLED_TRANSACTIONS_REQUEST);
let mut search_durations = TxFetcherSearchDurations::default();

// budget to look for an idle peer before giving up
Expand Down

0 comments on commit dc2af71

Please sign in to comment.