Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Removes MAX_TX_TO_IMPORT from ChainSync #6976

Merged
merged 1 commit into from
Nov 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions sync/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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)?;
Expand Down