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

invoices+channeldb: introduce InvoicesDB interface #7167

Closed

Conversation

bitromortac
Copy link
Collaborator

Change Description

Deals with the first two points of issue #6288.

  • Eliminate the invoice registry's dependency on the raw channel db pointer
  • Expose the new interface as part of the set of defined DatabaseInstances

This is a minimal version, I'm currently researching what would be needed to invert the dependency relation between channeldb and invoices packages. Ideally InvoicesDB would live in the invoices package.

The InvoicesDB is placed into channeldb, because its methods depend on
data types housed in channeldb. Eventually this iterface should be moved
to the invoices package.
Replace the channeldb.DB pointer with the InvoicesDB interface.
@saubyk saubyk linked an issue Nov 17, 2022 that may be closed by this pull request
4 tasks
//
// TODO(bitromortac): invert dependency relation between channeldb and invoices
// and move to invoices.
type InvoicesDB interface {
Copy link
Member

Choose a reason for hiding this comment

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

What about moving this to the invoice package itself? Then over time we can add new types there that are defined in that package. Follows the pattern of a package "declaring" what interface needs, with other packages then providing those at instantiation time.

@Roasbeef
Copy link
Member

Replaced by #7215

@Roasbeef Roasbeef closed this Jan 24, 2023
@bitromortac bitromortac deleted the 2210-invoice-interface branch April 17, 2024 12:45
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.

2 participants