Check plugin errors, uncomment PoW validation

This commit is contained in:
Ignotus Peverell 2018-12-14 04:51:35 +00:00
parent 80726c7f8f
commit 23cf377d3d
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -102,6 +102,16 @@ fn main() {
&mut solver_sols,
&mut solver_stats,
);
if solver_stats.has_errored {
println!(
"Plugin {} has errored, device: {}. Reason: {}",
solver_stats.get_plugin_name(),
solver_stats.get_device_name(),
solver_stats.get_error_reason(),
);
return;
}
nonce += 1;
}
@ -110,7 +120,7 @@ fn main() {
gen.header.pow.proof.nonces = solver_sols.sols[0].to_u64s();
assert!(gen.header.pow.is_secondary(), "Not a secondary header");
println!("Built genesis:\n{:?}", gen);
// core::pow::verify_size(&gen.header).unwrap();
core::pow::verify_size(&gen.header).unwrap();
gen.validate(
&BlindingFactor::zero(),
Arc::new(util::RwLock::new(LruVerifierCache::new())),
@ -189,7 +199,7 @@ fn update_genesis_rs(gen: &core::core::Block) {
replacements.push(("nonce".to_string(), format!("{}", gen.header.pow.nonce)));
replacements.push((
"nonces".to_string(),
format!("vec!{:x?}", gen.header.pow.proof.nonces),
format!("vec!{:?}", gen.header.pow.proof.nonces),
));
replacements.push((
"excess".to_string(),