Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: general optimisations #1301

Closed
wants to merge 31 commits into from

Conversation

obscuren
Copy link
Contributor

This PR depends on #1241

@obscuren obscuren self-assigned this Jun 20, 2015
@obscuren obscuren modified the milestone: 0.9.34 Jun 20, 2015
@obscuren obscuren force-pushed the core-optimisations branch 4 times, most recently from 94318d8 to fd6cd0b Compare June 27, 2015 12:02
@obscuren obscuren force-pushed the core-optimisations branch from fd6cd0b to 822f2fd Compare June 29, 2015 11:42
@obscuren obscuren modified the milestones: 0.9.34, Frontier Jun 29, 2015
@obscuren obscuren force-pushed the core-optimisations branch 2 times, most recently from 3f8ccb7 to cd5c257 Compare June 29, 2015 16:03
Conflicts:
	core/chain_manager.go
	miner/worker.go
@obscuren obscuren closed this Jun 29, 2015
@obscuren obscuren deleted the core-optimisations branch June 30, 2015 12:08
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Mar 16, 2023
* fix: p2p sync with lagging peer

no need to sync with lagging peer, which could make the local chain stalling as well.

* fix: do not drop lagging peer, will retry it later.

The lagging peer is probably already the best peer with largest total difficulty.
Shoule not remove it, since p2p is a bidirectional connection, drop it could make
the peer unable to sync with this peer as well.
And the lagging peer could catch up later, so keep it.

* p2p: add lagging field in Peer

lagging peer will be connected, but won't be used to sync.
the lagging flag can be clear once the Peer updates its latest block state.

* test: fix UT compile issue

* fix: lagging peer func rename

* test: fix a UT fail of download test

errStallingPeer is replaced by errLaggingPeer in this case

* fix: lagging issue in light mode

* test: add and resolve UT of lagging peer
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.

2 participants