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

Improve block tracker computation time #2280

Merged
merged 7 commits into from
Sep 9, 2020

Conversation

SebastianMarian
Copy link
Contributor

  • Improved block tracker computation time, when received headers are behind final or if registered handlers lists which should be notified on new headers received are empty

…behind final or if registered handlers lists which should be notified on new headers received are empty
@SebastianMarian SebastianMarian added the type:feature New feature or request label Sep 8, 2020
@SebastianMarian SebastianMarian self-assigned this Sep 8, 2020
@sasurobert sasurobert self-requested a review September 8, 2020 11:06
sasurobert
sasurobert previously approved these changes Sep 8, 2020
bogdan-rosianu
bogdan-rosianu previously approved these changes Sep 8, 2020
@@ -6,8 +6,9 @@ import (

// BlockNotifierHandlerMock -
type BlockNotifierHandlerMock struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

could be renamed to stub

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -174,10 +186,15 @@ func TestProcessReceivedHeader_ShouldWorkWhenHeaderIsFromSelfShard(t *testing.T)
return nil, nil, nil, nil
},
}
blockProcessorArguments.SelfNotarizer = &mock.BlockNotarizerHandlerMock{
GetLastNotarizedHeaderCalled: func(shardID uint32) (data.HeaderHandler, []byte, error) {
return &block2.Header{}, nil, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

rename package from block2 to something else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

bogdan-rosianu
bogdan-rosianu previously approved these changes Sep 8, 2020
sasurobert
sasurobert previously approved these changes Sep 8, 2020
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 d32f68c into development Sep 9, 2020
@LucianMincu LucianMincu deleted the Improve-block-tracker-computation-time branch September 9, 2020 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants