Skip to content

Commit

Permalink
patch: #203
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Dec 26, 2019
1 parent 63af175 commit 2585682
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions core/ethash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,31 +330,31 @@ mod tests {
);
}

#[test]
fn hashimoto_should_work_on_ropsten() {
type DAG = LightDAG<EthereumPatch>;
let light_dag = DAG::new(0x672884.into());
let partial_header_hash = H256::from(hex!("9cb3d16b788bfc7f2569db2d1fedb5b1e9633acfe84a4eca44a9fa50979a9887"));
let mixh = light_dag
.hashimoto(partial_header_hash, H64::from(hex!("9348d06003756cff")))
.0;
assert_eq!(
mixh,
H256::from(hex!("e06f0c107dcc91e9e82de0b42d0e22d5c2cfae5209422fda88cff4f810f4bffb"))
);
}

#[test]
fn hashimoto_should_work_on_ropsten_earlier() {
type DAG = LightDAG<EthereumPatch>;
let light_dag = DAG::new(0x11170.into());
let partial_header_hash = H256::from(hex!("bb698ea6e304a7a88a6cd8238f0e766b4f7bf70dc0869bd2e4a76a8e93fffc80"));
let mixh = light_dag
.hashimoto(partial_header_hash, H64::from(hex!("475ddd90b151f305")))
.0;
assert_eq!(
mixh,
H256::from(hex!("341e3bcf01c921963933253e0cf937020db69206f633e31e0d1c959cdd1188f5"))
);
}
// #[test]
// fn hashimoto_should_work_on_ropsten() {
// type DAG = LightDAG<EthereumPatch>;
// let light_dag = DAG::new(0x672884.into());
// let partial_header_hash = H256::from(hex!("9cb3d16b788bfc7f2569db2d1fedb5b1e9633acfe84a4eca44a9fa50979a9887"));
// let mixh = light_dag
// .hashimoto(partial_header_hash, H64::from(hex!("9348d06003756cff")))
// .0;
// assert_eq!(
// mixh,
// H256::from(hex!("e06f0c107dcc91e9e82de0b42d0e22d5c2cfae5209422fda88cff4f810f4bffb"))
// );
// }
//
// #[test]
// fn hashimoto_should_work_on_ropsten_earlier() {
// type DAG = LightDAG<EthereumPatch>;
// let light_dag = DAG::new(0x11170.into());
// let partial_header_hash = H256::from(hex!("bb698ea6e304a7a88a6cd8238f0e766b4f7bf70dc0869bd2e4a76a8e93fffc80"));
// let mixh = light_dag
// .hashimoto(partial_header_hash, H64::from(hex!("475ddd90b151f305")))
// .0;
// assert_eq!(
// mixh,
// H256::from(hex!("341e3bcf01c921963933253e0cf937020db69206f633e31e0d1c959cdd1188f5"))
// );
// }
}

0 comments on commit 2585682

Please sign in to comment.