From 51c4bea20a30b53c808d55039a3fa312b51759e9 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 30 Mar 2023 14:30:11 -0500 Subject: [PATCH] GH-596 forkdb reset in replay since blocks are signaled --- libraries/chain/controller.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 373826c7ef..65d679bb03 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -477,12 +477,13 @@ struct controller_impl { } void replay(std::function check_shutdown) { - if( !blog.head() && !fork_db.root() ) { + auto blog_head = blog.head(); + if( !fork_db.root() ) { fork_db.reset( *head ); - return; + if (!blog_head) + return; } - auto blog_head = blog.head(); replaying = true; auto start_block_num = head->block_num + 1; auto start = fc::time_point::now();