-
Notifications
You must be signed in to change notification settings - Fork 816
chore(customrawdb): unexport customrawdb.NewSyncPerformedIterator
#4450
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
Conversation
- This function is needed by `coreth` so it needs to be exported. Signed-off-by: Tsvetan Dimitrov (tsvetan.dimitrov@avalabs.org)
|
Where is this needed in coreth? |
It is needed here https://github.com/ava-labs/coreth/blob/master/plugin/evm/vmtest/test_syncervm.go#L645, but instead of |
|
I feel like that test is very weird no? Why would that package test the internals of this package? Shouldn't it just assert the exported behavior of this package? |
True, it is used more in the sense of an additional assertion step here and here when testing the VM behavior so it is not in the scope of a unit test for this particular package. I personally don't mind removing it. Wdyt @StephenButtolph ? |
Looking more closely, it seems like we should either expose both I generally feel like reducing cross-package dependencies helps us more in the long-run... Looking more closely at coreth, it seems that we currently use these to assert:
Couldn't we just use
If we are okay with changing those tests to use |
Yes, absolutely! Now that you've mentioned it, I never actually realized that In that case I'll unexport |
customrawdb.ParseSyncPerformedKeycustomrawdb.NewSyncPerformedIterator
Why this should be merged
corethso it can be unexported.How this works
NewSyncPerformedIteratortonewSyncPerformedIteratorHow this was tested
existing UT
Need to be documented in RELEASES.md?
no
Signed-off-by: Tsvetan Dimitrov (tsvetan.dimitrov@avalabs.org)