diff --git a/ethcore/src/client.rs b/ethcore/src/client.rs index 4b109c8a3..cc5e23869 100644 --- a/ethcore/src/client.rs +++ b/ethcore/src/client.rs @@ -265,6 +265,13 @@ impl Client { let engine = self.engine.deref().deref(); let header = &block.header; + // Check the block isn't so old we won't be able to enact it. + let best_block_number = self.chain.read().unwrap().best_block_number(); + if best_block_number >= HISTORY && header.number() <= best_block_number - HISTORY { + warn!(target: "client", "Block import failed for #{} ({})\nBlock is ancient (current best block: #{}).", header.number(), header.hash(), best_block_number); + return Err(()); + } + // Verify Block Family let verify_family_result = verify_block_family(&header, &block.bytes, engine, self.chain.read().unwrap().deref()); if let Err(e) = verify_family_result { diff --git a/install-deps.sh b/install-deps.sh index 6cc7de002..7a5db1003 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -569,7 +569,7 @@ function run_installer() if [[ $isSudo == false ]]; then apt-get install -q -y sudo fi - curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sudo sh -s -- --yes + curl -sf https://raw.githubusercontent.com/brson/multirust/master/quick-install.sh | sudo sh -s -- --yes echo fi