From 4e7adc6011e2ac6214d6c8ed198fa04f30303ca2 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Tue, 22 Oct 2024 23:32:16 -0400 Subject: [PATCH] No validate until ungapped at current height. --- src/chasers/chaser_validate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index 78cc41bb..26fe1d4b 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -164,8 +164,9 @@ void chaser_validate::do_bump(height_t) NOEXCEPT const auto link = query.to_candidate(height); const auto ec = query.get_block_state(link); - // Wait until the gap is filled. - if (ec == database::error::unassociated) + // TODO: make this more flexible/configurable. + // Wait until the gap is filled at a current height. + if (ec == database::error::unassociated || !is_current(link)) return; // complete_block always follows and decrements.