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

Queries With No Blocks #146

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Queries With No Blocks #146

wants to merge 2 commits into from

Conversation

hannahhoward
Copy link
Collaborator

No description provided.

Copy link
Contributor

@acruikshank acruikshank left a comment

Choose a reason for hiding this comment

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

This looks mostly good, but (as we discussed elsewhere) the behavior when two active requests share blocks and one of them ignores blocks needs to be resolved.

linkTracker := prs.getLinkTracker(requestID)
isUnique = linkTracker.BlockRefCount(link) == 0
_, noBlockRequest := prs.noBlockRequests[requestID]
isUnique = linkTracker.BlockRefCount(link) == 0 && !noBlockRequest
Copy link
Contributor

Choose a reason for hiding this comment

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

isUnique is now misleading. shouldSend?

})
require.NoError(t, err)

assertSentNotOnWire(t, bd1, blks[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we change this to assertNotSentOnWire? I assume this tests that the block is not sent at all, instead of it being sent but not on the wire like the name suggests.

return nil
})
require.NoError(t, err)
fph.AssertResponses(expectedResponses{
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be an assertion that the blks[0] was sent? I would expect that it was since IgnoreAllBlocks has not been called for requestID2, and I assume that's the point of this second transaction. Some comments on what the different sections of this test are trying to achieve would be helpful.

marten-seemann pushed a commit that referenced this pull request Mar 2, 2023
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.

2 participants