From 05f49f1d5fd949b5ba3034c71bf74111f26f19f4 Mon Sep 17 00:00:00 2001 From: Guanqun Lu <guanqun.lu@gmail.com> Date: Fri, 3 Aug 2018 13:54:47 +0800 Subject: [PATCH] should be MAX_IMPORTING_BLOCKS (#486) --- substrate/substrate/network/src/sync.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/substrate/network/src/sync.rs b/substrate/substrate/network/src/sync.rs index 3cfcf07ef34..01d9f3f245e 100644 --- a/substrate/substrate/network/src/sync.rs +++ b/substrate/substrate/network/src/sync.rs @@ -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, @@ -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 -- GitLab