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

Sync tracker pool with headers pool #2310

Merged
merged 3 commits into from
Sep 22, 2020

Conversation

SebastianMarian
Copy link
Contributor

@SebastianMarian SebastianMarian commented Sep 21, 2020

  • Sync tracker pool with headers pool LRU cacher when missing headers from tracker are requested (in this situation a delete will be done in headers pool, just to be sure that the notifiy event will be called for the requested/received header, even if in some edge case situations the requested header exists only in headers pool but not in tracker pool)

This situation could appear only in some rare events of restarting the node after more than 1000 rounds from its last commit

… from tracker are requested (in this situation a delete will be done in headers pool, just to be sure that the notifiy event will be called for the requested/received header, even if in some edge case situations the requested header exists only in headers pool but not in tracker pool)
@SebastianMarian SebastianMarian added type:bug Something isn't working type:feature New feature or request labels Sep 21, 2020
@SebastianMarian SebastianMarian self-assigned this Sep 21, 2020
@sasurobert sasurobert self-requested a review September 21, 2020 13:33
sasurobert
sasurobert previously approved these changes Sep 21, 2020
@@ -255,7 +255,9 @@ func (bp *baseProcessor) requestHeadersIfMissing(
missingNonces = append(missingNonces, nonces...)
}

headersPool := bp.dataPool.Headers()
Copy link
Contributor

Choose a reason for hiding this comment

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

some tests for the added code would be nice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would be added until the system tests are done

Copy link
Contributor

Choose a reason for hiding this comment

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

great

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

System tests passed.

@LucianMincu LucianMincu merged commit 665be58 into development Sep 22, 2020
@LucianMincu LucianMincu deleted the Sync-tracker-pool-with-cacher branch September 22, 2020 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants