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

Don't remove payload right after serving them #4258

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

jmederosalvarado
Copy link
Member

Fixes | Closes | Resolves #

Anything marked as optional that you didn't need to fill in, please remove it from the PR description. Choose one of the keywords above to refer to the issue this PR solves, followed by the issue number (e.g Fixes # 666). If there is no issue, remove the line. Remove this note after reading.

Changes:

  • Change PayloadPreparationService to not remove payloads after serving them

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests??

  • Yes
  • [] No

@@ -164,7 +164,7 @@ private void CleanupOldPayloads(object? sender, EventArgs e)

public Block? GetPayload(string payloadId)
{
if (_payloadStorage.TryRemove(payloadId, out IBlockImprovementContext? blockContext))
if (_payloadStorage.TryGetValue(payloadId, out IBlockImprovementContext? blockContext))
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to add test.

@LukaszRozmej LukaszRozmej merged commit 79e8ea5 into master Jul 8, 2022
@LukaszRozmej LukaszRozmej deleted the fix_payload_removal branch July 8, 2022 19:34
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.

None yet

3 participants