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: use hash instead of block number incase of reorg #107

Merged
merged 2 commits into from
Feb 16, 2021

Conversation

jdkanani
Copy link
Contributor

No description provided.

@jdkanani jdkanani marked this pull request as ready for review February 15, 2021 09:26
imyourm8
imyourm8 previously approved these changes Feb 15, 2021
@imyourm8 imyourm8 self-requested a review February 15, 2021 10:54
Copy link
Contributor

@itzmeanjan itzmeanjan left a comment

Choose a reason for hiding this comment

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

Just a comment

@@ -892,13 +895,16 @@ func (c *Bor) GetCurrentSpan(snapshotNumber uint64) (*Span, error) {
}

// GetCurrentValidators get current validators
func (c *Bor) GetCurrentValidators(snapshotNumber uint64, blockNumber uint64) ([]*Validator, error) {
func (c *Bor) GetCurrentValidators(headerHash common.Hash, blockNumber uint64) ([]*Validator, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This function caller should rather pass context as first argument, instead of

ctx, cancel := context.WithCancel(context.Background())

But we can do it later too.

@jdkanani jdkanani merged commit 6f0f08d into master Feb 16, 2021
@jdkanani jdkanani deleted the jdkanani/fix-use-hash branch February 16, 2021 09:41
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