Fix an instance where we were reporting that the peer was on an unreachable blockchain when they really weren't

This commit is contained in:
Eric Frias 2015-09-11 16:15:05 -04:00
parent 0046cc0698
commit e9e3b0d679

View file

@ -624,14 +624,14 @@ namespace detail {
elog("Unable to construct a blockchain synopsis for reference hash ${hash}: ${exception}", ("hash", reference_point)("exception", e)); elog("Unable to construct a blockchain synopsis for reference hash ${hash}: ${exception}", ("hash", reference_point)("exception", e));
throw; throw;
} }
} if (non_fork_high_block_num < low_block_num)
if (non_fork_high_block_num < low_block_num) {
{ wlog("Unable to generate a usable synopsis because the peer we're generating it for forked too long ago "
wlog("Unable to generate a usable synopsis because the peer we're generating it for forked too long ago " "(our chains diverge after block #${non_fork_high_block_num} but only undoable to block #${low_block_num})",
"(our chains diverge after block #${non_fork_high_block_num} but only undoable to block #${low_block_num})", ("low_block_num", low_block_num)
("low_block_num", low_block_num) ("non_fork_high_block_num", non_fork_high_block_num));
("non_fork_high_block_num", non_fork_high_block_num)); FC_THROW_EXCEPTION(graphene::net::block_older_than_undo_history, "Peer is are on a fork I'm unable to switch to");
FC_THROW_EXCEPTION(graphene::net::block_older_than_undo_history, "Peer is are on a fork I'm unable to switch to"); }
} }
} }
else else