Move Equihash verification APIs into equihash crate

This commit is contained in:
Jack Grigg 2020-06-26 13:01:04 +12:00
parent d71a599191
commit 5b2c71e112
5 changed files with 10 additions and 8 deletions

View File

@ -9,3 +9,6 @@ license = "MIT OR Apache-2.0"
edition = "2018"
[dependencies]
blake2b_simd = "0.5"
byteorder = "1"
log = "0.4"

View File

@ -1,7 +1,5 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
//! The Equihash Proof-of-Work function.
mod verify;
pub use verify::{is_valid_solution, is_valid_solution_iterative, is_valid_solution_recursive};

View File

@ -17,6 +17,7 @@ blake2b_simd = "0.5"
blake2s_simd = "0.5"
byteorder = "1"
crypto_api_chachapoly = "0.2.1"
equihash = { version = "0.0", path = "../components/equihash" }
ff = { version = "0.6", path = "../ff" }
fpe = "0.2"
hex = "0.3"

View File

@ -9,7 +9,7 @@ use std::ops::Deref;
use crate::serialize::Vector;
pub mod equihash;
pub use equihash;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct BlockHash(pub [u8; 32]);