From 7eacef99b9dfc18d2bda1c7d90544d62c032d823 Mon Sep 17 00:00:00 2001 From: Dmitry Kashitsyn Date: Fri, 3 Nov 2017 19:09:59 +0700 Subject: [PATCH] Removes MAX_TX_TO_IMPORT from `ChainSync` (#6976) --- sync/src/chain.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 86c28d59a..396f031b6 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -129,7 +129,6 @@ const MIN_PEERS_PROPAGATION: usize = 4; const MAX_PEERS_PROPAGATION: usize = 128; const MAX_PEER_LAG_PROPAGATION: BlockNumber = 20; const MAX_NEW_HASHES: usize = 64; -const MAX_TX_TO_IMPORT: usize = 512; const MAX_NEW_BLOCK_AGE: BlockNumber = 20; const MAX_TRANSACTION_SIZE: usize = 300*1024; // maximal packet size with transactions (cannot be greater than 16MB - protocol limitation). @@ -1477,9 +1476,8 @@ impl ChainSync { trace!(target: "sync", "{} Ignoring transactions from unconfirmed/unknown peer", peer_id); } - let mut item_count = r.item_count()?; + let item_count = r.item_count()?; trace!(target: "sync", "{:02} -> Transactions ({} entries)", peer_id, item_count); - item_count = cmp::min(item_count, MAX_TX_TO_IMPORT); let mut transactions = Vec::with_capacity(item_count); for i in 0 .. item_count { let rlp = r.at(i)?;