Skip to content

Commit

Permalink
Fix EOSIO#7767 - node never identified its peer is done syncying
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner authored and algys committed Sep 27, 2019
1 parent d20a7fc commit b32efd5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,14 @@ namespace eosio {
if (msg.known_blocks.ids.size() == 0) {
fc_elog( logger,"got a catch up with ids size = 0" );
} else {
verify_catchup(c, msg.known_blocks.pending, msg.known_blocks.ids.back());
const block_id_type& id = msg.known_blocks.ids.back();
controller& cc = chain_plug->chain();
if( !cc.fetch_block_by_id( id ) ) {
verify_catchup( c, msg.known_blocks.pending, id );
} else {
// we already have the block, so update peer with our view of the world
c->send_handshake();
}
}
}
else {
Expand Down

0 comments on commit b32efd5

Please sign in to comment.