Skip to content

Disconnect peer liang - #478

Merged
olenheim merged 8 commits into
developfrom
disconnect-peer-liang
Apr 20, 2018
Merged

olenheim merged 8 commits into
developfrom
disconnect-peer-liang

Conversation

@lvs007

@lvs007 lvs007 commented Apr 19, 2018

Copy link
Copy Markdown
Contributor

What does this PR do?
If the main chain of the current node is higher than the synchronous node and the synchronization block is not found, then the peer link is disconnected.
Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details


RESET(0x11),

SYNC_FAIL(0x12),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reason need modify proto files

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to proto files

if (blockIds.isEmpty()) {
peer.setNeedSyncFromUs(false);
if (CollectionUtils.isNotEmpty(summaryChainIds) && summaryChainIds.get(0).getNum() < del
.getHeadBlockId().getNum()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when peer's number id lower than our solid block number , It's really sync fail, in this case , it maybe can sync again

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modify use LatestBlockHeaderNumber compare

@olenheim
olenheim merged commit cd507bb into develop Apr 20, 2018
@olenheim
olenheim deleted the disconnect-peer-liang branch April 20, 2018 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants