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

fix: skip checksums on windows for now #2553

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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