提交 5843fde8 编写于 作者: P Phil Mesnier

#2615 fix for interrupted syncing

上级 4a2746e0
......@@ -883,7 +883,7 @@ namespace eosio {
handshake_initializer::populate(last_handshake_sent);
last_handshake_sent.generation = ++sent_handshake_count;
fc_dlog(logger, "Sending handshake generation ${g} to ${ep}",
("g",last_handshake_sent.generation)("ep", peer_addr));
("g",last_handshake_sent.generation)("ep", peer_name()));
enqueue(last_handshake_sent);
}
......@@ -1416,6 +1416,9 @@ namespace eosio {
if( req.req_blocks.mode == catch_up ) {
c->fork_head = id;
c->fork_head_num = num;
ilog ("got a catch_up notice while in ${s}, fork head num = ${fhn} target LIB = ${lib} next_expected = ${ne}", ("s",stage_str(state))("fhn",num)("lib",sync_known_lib_num)("ne", sync_next_expected_num));
if (state == lib_catchup)
return;
set_state(head_catchup);
}
else {
......@@ -1444,6 +1447,7 @@ namespace eosio {
}
void sync_manager::recv_block (connection_ptr c, const block_id_type &blk_id, uint32_t blk_num, bool accepted) {
fc_dlog(logger," got block ${bn} from ${p}",("bn",blk_num)("p",c->peer_name()));
if (!accepted) {
uint32_t head_num = chain_plug->chain().head_block_num();
if (head_num != last_repeated) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册