mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
Check plugin errors, uncomment PoW validation
This commit is contained in:
parent
80726c7f8f
commit
23cf377d3d
1 changed files with 12 additions and 2 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue