@@ -44,7 +44,8 @@ chaser_validate::chaser_validate(full_node& node) NOEXCEPT
4444 initial_subsidy_(node.config().bitcoin.initial_subsidy()),
4545 maximum_backlog_(node.config().node.maximum_concurrency_()),
4646 node_witness_(node.config().network.witness_node()),
47- filter_(node.archive().filter_enabled())
47+ filter_(node.archive().filter_enabled()),
48+ defer_(node.config().node.defer_validation)
4849{
4950}
5051
@@ -170,12 +171,13 @@ void chaser_validate::do_bumped(height_t height) NOEXCEPT
170171 if (ec == database::error::unassociated)
171172 return ;
172173
173- const auto bypass = is_under_checkpoint (height) ||
174+ const auto bypass = defer_ || is_under_checkpoint (height) ||
174175 query.is_milestone (link);
175176
176177 if (bypass)
177178 {
178- if (filter_)
179+ // Filters will be set on subsequent unsupressed run.
180+ if (filter_ && !defer_)
179181 {
180182 post_block (link, bypass);
181183 }
@@ -350,9 +352,15 @@ void chaser_validate::complete_block(const code& ec, const header_link& link,
350352 }
351353
352354 // VALID BLOCK
355+ // Under deferral there is no state change, but downloads will stall unless
356+ // he window is closed out, so notify the check chaser of the increment.
353357 notify (ec, chase::valid, possible_wide_cast<height_t >(height));
354- fire (events::block_validated, height);
355- LOGV (" Block validated: " << height << (bypass ? " (bypass)" : " " ));
358+
359+ if (!defer_)
360+ {
361+ fire (events::block_validated, height);
362+ LOGV (" Block validated: " << height << (bypass ? " (bypass)" : " " ));
363+ }
356364}
357365
358366// Overrides due to independent priority thread pool
0 commit comments