Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fix: skip checksums on windows for now (#2553)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Aug 13, 2023
1 parent 980c7c8 commit 8e50e43
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ethers-solc/src/compile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ impl Solc {
/// Verify that the checksum for this version of solc is correct. We check against the SHA256
/// checksum from the build information published by [binaries.soliditylang.org](https://binaries.soliditylang.org/)
#[cfg(all(feature = "svm-solc", not(target_arch = "wasm32")))]
#[cfg_attr(windows, allow(unreachable_code, unused_variables))]
pub fn verify_checksum(&self) -> Result<()> {
let version = self.version_short()?;
let mut version_path = svm::version_path(version.to_string().as_str());
Expand All @@ -478,6 +479,13 @@ impl Solc {
return Ok(())
}

#[cfg(windows)]
{
// we skip checksum verification on windows because the expected checksum is for the
// entire zip file and not the extracted solc binary TODO: <https://github.com/alloy-rs/svm-rs/issues/95>
return Ok(())
}

use sha2::Digest;
let mut hasher = sha2::Sha256::new();
hasher.update(content);
Expand Down

0 comments on commit 8e50e43

Please sign in to comment.