diff --git a/chain/src/pipe.rs b/chain/src/pipe.rs
index aaeb427fb..e19bcc194 100644
--- a/chain/src/pipe.rs
+++ b/chain/src/pipe.rs
@@ -175,12 +175,14 @@ fn validate_header(header: &BlockHeader, ctx: &mut BlockContext) -> Result<(), E
}
if !ctx.opts.intersects(SKIP_POW) {
- let cycle_size = global::sizeshift();
-
- debug!(LOGGER, "pipe: validate_header cuckoo size {}", cycle_size);
- if !(ctx.pow_verifier)(header, cycle_size as u32) {
+ let n = global::sizeshift() as u32;
+ if !(ctx.pow_verifier)(header, n) {
+ error!(LOGGER, "pipe: validate_header failed for cuckoo shift size {}", n);
return Err(Error::InvalidPow);
}
+ if header.height % 500 == 0 {
+ debug!(LOGGER, "Validating header validated, using cuckoo shift size {}", n);
+ }
}
// first I/O cost, better as late as possible
@@ -333,16 +335,12 @@ fn update_head(b: &Block, ctx: &mut BlockContext) -> Result