Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #10321 from EOSIO/huangminghuang/fix-state-history
Browse files Browse the repository at this point in the history
huangminghuang/fix-state-history
  • Loading branch information
huangminghuang authored May 3, 2021
2 parents dfb13bc + f151849 commit 2d1f524
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/state_history_plugin/state_history_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@ struct state_history_plugin_impl : std::enable_shared_from_this<state_history_pl
[&block_state, this](const auto& req) {
// send get_blocks_result_v1 when the request is get_blocks_request_v0 and
// send send_block_result_v2 when the request is get_blocks_request_ v1.
typename std::decay_t<decltype(req)>::response_type result;
result.head = { block_state->block_num, block_state->id };
send_update(block_state->block, std::move(result));
if (block_state->block) {
typename std::decay_t<decltype(req)>::response_type result;
result.head = { block_state->block_num, block_state->id };
send_update(block_state->block, std::move(result));
}
},
*current_request);
}
Expand Down

0 comments on commit 2d1f524

Please sign in to comment.