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

Export Internal Packages + Miscellaneous Bug Fixes #93

Merged
merged 10 commits into from
Aug 8, 2020

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Aug 7, 2020

Closes: #91

In this PR, all /internal packages are made external. A few developers have asked to use some of the storage-based packages for their own projects.

Changes

  • Move all packages in /internal to /pkg
  • Return *types.BlockIdentifier with CoinStorage.GetCoins
  • Track coins on check:data
  • Don't put genesis in block cache multiple times
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache
2020/08/07 17:05:00 Added &{Index:0 Hash:000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943} to cache

@coveralls
Copy link

coveralls commented Aug 7, 2020

Pull Request Test Coverage Report for Build 3352

  • 17 of 26 (65.38%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.06%) to 71.628%

Changes Missing Coverage Covered Lines Changed/Added Lines %
configuration/configuration.go 1 3 33.33%
pkg/storage/coin_storage.go 9 16 56.25%
Totals Coverage Status
Change from base Build 3338: -0.06%
Covered Lines: 1593
Relevant Lines: 2224

💛 - Coveralls

@patrick-ogrady patrick-ogrady changed the title [WIP] Export Internal Packages Export Internal Packages + Miscellaneous Bug Fixes Aug 8, 2020

// CoinStorageHelper implements the storage.CoinStorageHelper
// interface.
type CoinStorageHelper struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this file be in storage package if this implements storage.CoinStorageHelper?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to do a big refactor on everything in processor. The whole package can likely be removed by aligning helper/handler interfaces with existing package interfaces. We would then just provide an instantiation of the fetcher (for example) instead of a processor that wraps the fetcher.

@patrick-ogrady patrick-ogrady merged commit 0edccc4 into master Aug 8, 2020
@patrick-ogrady patrick-ogrady deleted the patrick/export-internal branch August 8, 2020 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

hide loaded configuration in view operations
4 participants