-
Notifications
You must be signed in to change notification settings - Fork 296
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
Split blockchain package to reduce transient dependency packages #1409
Comments
I'm not against the concept in theory, however, I'm not really sure what a good name for such a package would be as those really are all things that apply to the blockchain. Also, there would need to be some considerations made in terms of the behavior flags since we don't want circular dependencies. From what I see, those functions basically fall into the following categories:
|
I'm at a loss for a good package name as well, which is why I did not provide one :) I don't think I understand the issue with |
Another thing to keep in mind is that not all of these funcs and types (and there are a lot of them I didn't know about, based on my limited usage of blockchain in dcrwallet) need to all move into a single package. There could be separate packages for transaction classification, for difficulty calculation, etc. while keeping all of them under the same module. |
|
This has been implemented via the |
dcrwallet depends on the following APIs of the blockchain package:
However, none of these require database access, and simply importing the blockchain package additionally pulls in a multitude of other dependencies, including transitive dependencies which do not pass tests.
The most concerning of these imports is the test import on ffldb. This causes various leveldb packages to be built and tested as part of a dcrwallet
go test all
, even though dcrwallet does not use leveldb at all in non-test builds.To fix this issue, the blockchain package can be split to move the non-DB APIs into a different package. It does not necessarily need to be in a different module, as
go test all
will only test the packages used as part of a complete build, and not all packages in every dependent module.edit: I should be clear here, the failing tests are not due to leveldb itself (all tests for imported packages of the goleveldb module pass), but some transitive deps required by these goleveldb packages do not pass.
The text was updated successfully, but these errors were encountered: