Skip to content

Commit 77e52fb

Browse files
committed
Allow unknown_state for block reset.
1 parent a020cdd commit 77e52fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/chasers/chaser_validate.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,11 @@ void chaser_validate::do_bump(height_t) NOEXCEPT
140140
const auto ec = query.get_block_state(link);
141141

142142
// First block state should be unvalidated, valid, or confirmable. This is
143-
// assured in do_checked by chasing block checks.
143+
// assured in do_checked by chasing block checks. unknown_state is a reset.
144144
const auto ready =
145145
(ec == database::error::unvalidated) ||
146146
(ec == database::error::block_valid) ||
147+
(ec == database::error::unknown_state) ||
147148
(ec == database::error::block_confirmable);
148149

149150
if (ready)
@@ -186,6 +187,7 @@ void chaser_validate::do_bumped(height_t height) NOEXCEPT
186187
else switch (ec.value())
187188
{
188189
case database::error::unvalidated:
190+
case database::error::unknown_state:
189191
{
190192
post_block(link, bypass);
191193
break;

0 commit comments

Comments
 (0)