From e1476a1156ee9ef0ba24419cafe4d4c7f4051156 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Fri, 26 Nov 2021 19:02:18 +0200 Subject: [PATCH] fix: remove redundant cache read (#627) --- ethers-solc/src/lib.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ethers-solc/src/lib.rs b/ethers-solc/src/lib.rs index 38644689..ef27c4f4 100644 --- a/ethers-solc/src/lib.rs +++ b/ethers-solc/src/lib.rs @@ -219,15 +219,7 @@ impl Project { // once matched, proceed to compile with it compiled.extend(self.compile_with_version(&solc, sources)?); } - if !compiled.has_compiled_contracts() && - !compiled.has_compiler_errors() && - self.cached && - self.paths.cache.exists() - { - let cache = SolFilesCache::read(&self.paths.cache)?; - let artifacts = cache.read_artifacts::(&self.paths.artifacts)?; - compiled.artifacts.extend(artifacts); - } + Ok(compiled) }