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

Net plugin fixes 1.7 #7806

Merged
merged 3 commits into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,13 @@ namespace eosio {
uint32_t end = std::max( peer_requested->end_block, block_header::num_from_id(head_id) );
peer_requested = sync_state( start, end, start - 1 );
}
enqueue_sync_block();

if( peer_requested->start_block <= peer_requested->end_block ) {
fc_dlog( logger, "enqueue ${s} - ${e}", ("s", peer_requested->start_block)( "e", peer_requested->end_block ) );
enqueue_sync_block();
} else {
peer_requested.reset();
}

// still want to send transactions along during blk branch sync
syncing = false;
Expand Down Expand Up @@ -2543,7 +2549,6 @@ namespace eosio {
} catch( const fc::exception &ex) {
peer_elog(c, "bad signed_block : ${m}", ("m",ex.what()));
fc_elog( logger, "accept_block threw a non-assert exception ${x} from ${p}",( "x",ex.to_string())("p",c->peer_name()));
reason = no_reason;
} catch( ...) {
peer_elog(c, "bad signed_block : unknown exception");
fc_elog( logger, "handle sync block caught something else from ${p}",("num",blk_num)("p",c->peer_name()));
Expand Down
4 changes: 2 additions & 2 deletions tests/Node.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ def isBlockPresent(self, blockNum, blockType=BlockType.head):
present = True if blockNum <= node_block_num else False
if Utils.Debug and blockType==BlockType.lib:
decorator=""
if present:
decorator="is not "
if not present:
decorator="not "
Utils.Print("Block %d is %sfinalized." % (blockNum, decorator))

return present
Expand Down