@@ -65,6 +65,7 @@ bool chaser_confirm::handle_event(const code&, chase event_,
6565 return false ;
6666
6767 // Stop generating query during suspension.
68+ // Incoming events may already be flushed to the strand at this point.
6869 if (suspended ())
6970 return true ;
7071
@@ -132,13 +133,17 @@ void chaser_confirm::do_bump(height_t) NOEXCEPT
132133void chaser_confirm::do_bumped (height_t ) NOEXCEPT
133134{
134135 BC_ASSERT (stranded ());
135- const auto & query = archive ();
136136
137137 if (closed ())
138138 return ;
139139
140+ // Stop while suspended as iteration is O(N^2) if blocks not organized.
141+ if (suspended ())
142+ return ;
143+
140144 // Guarded by candidate interlock.
141145 size_t fork_point{};
146+ const auto & query = archive ();
142147 auto fork = query.get_validated_fork (fork_point, checkpoint (), filter_);
143148
144149 // Fork may be empty if candidates were reorganized.
@@ -221,6 +226,7 @@ void chaser_confirm::organize(header_states& fork, const header_links& popped,
221226 auto & query = archive ();
222227 auto height = add1 (fork_point);
223228
229+ // Continue when suspended as write error terminates synchronous loop.
224230 for (const auto & state: fork)
225231 {
226232 switch (state.ec .value ())
@@ -238,6 +244,7 @@ void chaser_confirm::organize(header_states& fork, const header_links& popped,
238244 }
239245 case database::error::block_valid:
240246 {
247+ // False always sets a store fault (including for disk full).
241248 if (!confirm_block (state.link , height, popped, fork_point))
242249 return ;
243250
0 commit comments