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

Fix asssertPeerRelevance during pre-genesis #2090

Merged
merged 1 commit into from
Feb 23, 2021
Merged

Conversation

wemeetagain
Copy link
Member

Peers were not connecting before genesis (due to clock skew between headSlot=0 and currentSlot=-N)

Fixes issues seen in sim tests

@github-actions github-actions bot added the scope-networking All issues related to networking, gossip, and libp2p. label Feb 23, 2021
@codeclimate
Copy link

codeclimate bot commented Feb 23, 2021

Code Climate has analyzed commit 220e874 and detected 0 issues on this pull request.

View more on Code Climate.


it("Accept during pre-genesis clock", () => {
// clock slot pre-genesis (< 0) by a good margin
(chain as any).clock.currentSlot = -50;
Copy link
Member

Choose a reason for hiding this comment

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

Would be nicer to not cast as any (in case we rename or move clock we won't detect error here) but unlikely to happen so I guess it's fine

@wemeetagain wemeetagain merged commit 54b409e into master Feb 23, 2021
@wemeetagain wemeetagain deleted the cayman/fix-sim branch February 23, 2021 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-networking All issues related to networking, gossip, and libp2p.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants