-
Notifications
You must be signed in to change notification settings - Fork 52
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
Simplify dastore backend #50
Conversation
return nil | ||
} | ||
|
||
func (r *MiniredisBackend) FetchEngineBidById(bidId suave.BidId) (suave.Bid, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions were copy/paste from the Redis
backend.
local *miniredis.Miniredis | ||
} | ||
|
||
func NewLocalConfidentialStore() *RedisStoreBackend { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the miniredis
version of the RedisStoreBackend
that works in memory as the local store.
@@ -39,6 +45,16 @@ func NewRedisStoreBackend(redisUri string) *RedisStoreBackend { | |||
} | |||
|
|||
func (r *RedisStoreBackend) Start() error { | |||
if r.redisUri == "" { | |||
// create a mini-redis instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It defaults to local miniredis
if no endpoint is specified. Then, the rest of the store works for both remote/local Redis.
suave "github.com/ethereum/go-ethereum/suave/core" | ||
) | ||
|
||
type LocalConfidentialStore struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd maybe leave local store in since it's easy to debug with
📝 Summary
This PR simplifies the Confidential Store implementations to a single Redis implementation. The other two (removed in this PR) are versions of that Redis implementation.
📚 References