Skip to content

Commit 4b87f36

Browse files
committed
Suspend outer confirm loop while network is suspended.
1 parent 8814a22 commit 4b87f36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/chasers/chaser_confirm.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ void chaser_confirm::do_bumped(height_t) NOEXCEPT
138138
if (closed())
139139
return;
140140

141+
// Stop while suspended as iteration is O(N^2) if blocks not organized.
142+
if (suspended())
143+
return;
144+
141145
// Guarded by candidate interlock.
142146
size_t fork_point{};
143147
auto fork = query.get_validated_fork(fork_point, checkpoint(), filter_);

0 commit comments

Comments
 (0)