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

feat(sync): Limit the maximum height of once sync #390

Merged
merged 5 commits into from
Aug 6, 2020

Conversation

yejiayu
Copy link
Contributor

@yejiayu yejiayu commented Aug 3, 2020

What type of PR is this?
feat

What this PR does / why we need it:
Each successful download of 50 blocks will complete synchronization to avoid downloading too many blocks from a single node, which will affect the success rate of network transmission.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@yejiayu yejiayu changed the title [WIP]feat(sync): Limit the maximum height of once sync feat(sync): Limit the maximum height of once sync Aug 6, 2020
let remote_height = if current_height + ONCE_SYNC_BLOCK_LIMIT > remote_height {
remote_height
} else {
remote_height + ONCE_SYNC_BLOCK_LIMIT
Copy link
Contributor

Choose a reason for hiding this comment

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

current_height + ONCE_SYNC_BLOCK_LIMIT

@yejiayu
Copy link
Contributor Author

yejiayu commented Aug 6, 2020

/hold

wait tests

@yejiayu
Copy link
Contributor Author

yejiayu commented Aug 6, 2020

/retest

1 similar comment
@LycrusHamster
Copy link
Contributor

/retest

@yejiayu
Copy link
Contributor Author

yejiayu commented Aug 6, 2020

/hold cancel

test pass

@KaoImin
Copy link

KaoImin commented Aug 6, 2020

/lgtm

@muta-robot muta-robot added the lgtm #8ef42e label Aug 6, 2020
@muta-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KaoImin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yejiayu
Copy link
Contributor Author

yejiayu commented Aug 6, 2020

/retest

1 similar comment
@yejiayu
Copy link
Contributor Author

yejiayu commented Aug 6, 2020

/retest

@muta-robot muta-robot merged commit f951a95 into nervosnetwork:master Aug 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants