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 reorg depth count #5160

Merged
merged 3 commits into from
Feb 16, 2023

Conversation

maschad
Copy link
Contributor

@maschad maschad commented Feb 16, 2023

Closes #5136

@maschad maschad requested a review from a team as a code owner February 16, 2023 19:09
@@ -767,7 +767,7 @@ export class ForkChoice implements IForkChoice {
return blocksAtSlot;
}

/** Returns the distance of common ancestor of nodes to newNode. Returns null if newNode is descendant of prevNode */
/** Returns the distance of common ancestor of nodes to the max of the newNode and the prevNode. Returns null if newNode is descendant of prevNode */
Copy link
Member

Choose a reason for hiding this comment

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

Seems this null comment is stale. Can you just remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Line 781 suggests the noCommonAncestor error code is equivalent to a null response which is why I left it

Copy link
Member

Choose a reason for hiding this comment

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

I think that comment was from before we returned a AncestorResult.

@wemeetagain wemeetagain enabled auto-merge (squash) February 16, 2023 22:18
@wemeetagain wemeetagain merged commit 63479b4 into ChainSafe:unstable Feb 16, 2023
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.6.0 🎉

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.

Reorg depth counter is incorrect
2 participants