Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
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
should be MAX_IMPORTING_BLOCKS
  • Loading branch information
Guanqun Lu committed Aug 2, 2018
commit 5af564baa728ca7f5b211cc0760abb8014107521
4 changes: 2 additions & 2 deletions substrate/network/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use import_queue::ImportQueue;
// Maximum blocks to request in a single packet.
const MAX_BLOCKS_TO_REQUEST: usize = 128;
// Maximum blocks to store in the import queue.
const MAX_IMPORING_BLOCKS: usize = 2048;
const MAX_IMPORTING_BLOCKS: usize = 2048;

struct PeerSync<B: BlockT> {
pub common_hash: B::Hash,
Expand Down Expand Up @@ -361,7 +361,7 @@ impl<B: BlockT> ChainSync<B> {
if let Some(ref mut peer) = self.peers.get_mut(&who) {
let import_status = self.import_queue.status();
// when there are too many blocks in the queue => do not try to download new blocks
if import_status.importing_count > MAX_IMPORING_BLOCKS {
if import_status.importing_count > MAX_IMPORTING_BLOCKS {
return;
}
// we should not download already queued blocks
Expand Down