diff --git a/crates/node/src/geth.rs b/crates/node/src/geth.rs index 41c0327..0c0e153 100644 --- a/crates/node/src/geth.rs +++ b/crates/node/src/geth.rs @@ -283,8 +283,10 @@ impl Node for Instance { })?; } - // Remove the node's database so that subsequent runs do not run on the same database. - remove_dir_all(self.base_directory.join("data"))?; + // Remove the node's database so that subsequent runs do not run on the same database. We + // ignore the error just in case the directory didn't exist in the first place and therefore + // there's nothing to be deleted. + let _ = remove_dir_all(self.base_directory.join("data")); Ok(()) } diff --git a/crates/node/src/kitchensink.rs b/crates/node/src/kitchensink.rs index ec0ab13..48324b2 100644 --- a/crates/node/src/kitchensink.rs +++ b/crates/node/src/kitchensink.rs @@ -412,8 +412,10 @@ impl Node for KitchensinkNode { })?; } - // Remove the node's database so that subsequent runs do not run on the same database. - remove_dir_all(self.base_directory.join("chains"))?; + // Remove the node's database so that subsequent runs do not run on the same database. We + // ignore the error just in case the directory didn't exist in the first place and therefore + // there's nothing to be deleted. + let _ = remove_dir_all(self.base_directory.join("data")); Ok(()) }