From bd43d61f2fc9646139c31a16f4fba6bbe136827f Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 3 Apr 2024 08:52:12 -0500 Subject: [PATCH] GH-2102 May already be in forkdb since we are adding as soon as header validation complete --- libraries/chain/controller.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index fe41683d00..d25440d520 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -3690,10 +3690,6 @@ struct controller_impl { auto f = [&](auto& forkdb) -> std::future { return post_async_task( thread_pool.get_executor(), [b, id, &forkdb, control=this]() { - // no reason for a block_state if fork_db already knows about block - auto existing = forkdb.get_block( id ); - EOS_ASSERT( !existing, fork_database_exception, "we already know about this block: ${id}", ("id", id) ); - auto prev = forkdb.get_block( b->previous, include_root_t::yes ); EOS_ASSERT( prev, unlinkable_block_exception, "unlinkable block ${id} previous ${p}", ("id", id)("p", b->previous) ); @@ -3723,10 +3719,6 @@ struct controller_impl { EOS_ASSERT( b, block_validate_exception, "null block" ); auto f = [&](auto& forkdb) -> std::optional { - // no reason for a block_state if fork_db already knows about block - auto existing = forkdb.get_block( id ); - EOS_ASSERT( !existing, fork_database_exception, "we already know about this block: ${id}", ("id", id) ); - // previous not found could mean that previous block not applied yet auto prev = forkdb.get_block( b->previous, include_root_t::yes ); if( !prev ) return {};