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] redis.GetBidTrace should return err=redis.Nil on missing item #468

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

metachris
Copy link
Collaborator

@metachris metachris commented Jun 18, 2023

📝 Summary

If redis.GetBidTrace doesn't find the item, it should return redis.Nil as error, instead of no error. This is only used in https://github.com/flashbots/mev-boost-relay/blob/getBidTrace-fix2/services/api/service.go#L1361 which would crash when saving the delivered payload when this happens (the bidTrace not being found in Redis).

Extends #467


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

@metachris metachris changed the title redis.GetBidTrace fix on missing item [fix] redis.GetBidTrace fix on missing item Jun 18, 2023
@metachris metachris changed the title [fix] redis.GetBidTrace fix on missing item [fix] redis.GetBidTrace should return err=redis.Nil on missing item Jun 18, 2023
@metachris metachris changed the title [fix] redis.GetBidTrace should return err=redis.Nil on missing item [fix] redis.GetBidTrace should return err=redis.Nil on missing item Jun 18, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #468 (d325afa) into main (df01505) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #468      +/-   ##
==========================================
+ Coverage   30.85%   30.86%   +0.01%     
==========================================
  Files          24       24              
  Lines        4739     4736       -3     
==========================================
  Hits         1462     1462              
+ Misses       3079     3076       -3     
  Partials      198      198              
Flag Coverage Δ
unittests 30.86% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
datastore/redis.go 60.20% <ø> (+0.36%) ⬆️

@michaelneuder michaelneuder self-assigned this Jun 18, 2023
Copy link
Collaborator

@michaelneuder michaelneuder left a comment

Choose a reason for hiding this comment

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

lgtm

@metachris metachris merged commit b954716 into main Jun 18, 2023
@metachris metachris deleted the getBidTrace-fix2 branch June 18, 2023 13:44
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