Skip to content

Commit

Permalink
Use structure binding
Browse files Browse the repository at this point in the history
  • Loading branch information
linh2931 committed Sep 21, 2024
1 parent 1888501 commit a9ae2d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/chain/block_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,10 @@ namespace eosio { namespace chain {

std::vector<char> read_serialized_block_by_num(uint32_t block_num) final {
try {
block_pos_size_t pos_size = get_block_position_and_size(block_num);
if (pos_size.position != block_log::npos) {
block_file.seek(pos_size.position);
return read_serialized_block(block_file, pos_size.size);
auto [ position, size ] = get_block_position_and_size(block_num);
if (position != block_log::npos) {
block_file.seek(position);
return read_serialized_block(block_file, size);
}
return retry_read_serialized_block_by_num(block_num);
}
Expand Down

0 comments on commit a9ae2d8

Please sign in to comment.