Skip to content

Commit

Permalink
Revert "allow sha3 and keccak" and "fork 2: disable md5".
Browse files Browse the repository at this point in the history
This reverts commit dd96449.
This reverts commit c26b38c.
  • Loading branch information
JoshOrndorff committed May 24, 2024
1 parent 725e09d commit d6f2740
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions multi-pow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,25 +331,15 @@ impl FromStr for MaxiPosition {
}
}

fn manual_fork_validation(parent_number: u32, algo: SupportedHashes) -> bool {
fn manual_fork_validation(_parent_number: u32, algo: SupportedHashes) -> bool {
use SupportedHashes::*;

// In the beginning there was md5 and it was good.
// On the second day we enabled sha3 and keccak and it was good.
if parent_number < 2300 {
match algo {
Md5 => true,
Sha3 => true,
Keccak => true,
}
}
// On the third day we disable md5 and it was good
else {
match algo {
Md5 => false,
Sha3 => true,
Keccak => true,
}
// To begin with we only allow md5 hashes for our pow.
// After the fork height this check is skipped so all the hashes become valid.
match algo {
Md5 => true,
Sha3 => false,
Keccak => false,
}
}

Expand Down

0 comments on commit d6f2740

Please sign in to comment.