Skip to content

Commit

Permalink
Merge pull request #234 from AntelopeIO/check_root_bnum_forkdb
Browse files Browse the repository at this point in the history
check root block num before returning it when `include_root_t::yes`
  • Loading branch information
spoonincode authored Jun 4, 2024
2 parents caa9af7 + 4a33a09 commit 76f33e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/chain/fork_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ namespace eosio::chain {

template<class BSP>
BSP fork_database_impl<BSP>::search_on_branch_impl( const block_id_type& h, uint32_t block_num, include_root_t include_root ) const {
if( include_root == include_root_t::yes && root->id() == h ) {
if( include_root == include_root_t::yes && root->id() == h && root->block_num() == block_num ) {
return root;
}

Expand Down

0 comments on commit 76f33e1

Please sign in to comment.