Skip to content

Commit

Permalink
GH-2102 May already be in forkdb since we are adding as soon as heade…
Browse files Browse the repository at this point in the history
…r validation complete
  • Loading branch information
heifner committed Apr 3, 2024
1 parent 3887b2c commit bd43d61
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3690,10 +3690,6 @@ struct controller_impl {

auto f = [&](auto& forkdb) -> std::future<block_handle> {
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) );
Expand Down Expand Up @@ -3723,10 +3719,6 @@ struct controller_impl {
EOS_ASSERT( b, block_validate_exception, "null block" );

auto f = [&](auto& forkdb) -> std::optional<block_handle> {
// 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 {};
Expand Down

0 comments on commit bd43d61

Please sign in to comment.