-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: refactor FullNodeTypes #15537
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
base: main
Are you sure you want to change the base?
feat: refactor FullNodeTypes #15537
Conversation
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 like this a lot already
/// Node's types with the database. | ||
type Types: NodeTypes; | ||
/// Underlying database type used by the node to store and retrieve data. | ||
type DB: Database + DatabaseMetrics + Clone + Unpin + 'static; | ||
/// The provider type used to interact with the node. | ||
type Provider: FullProvider<NodeTypesWithDBAdapter<Self::Types, Self::DB>>; | ||
type Provider: FullProvider<Self>; |
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.
so much better
crates/node/types/src/lib.rs
Outdated
|
||
/// An adapter type combining [`NodeTypes`] and db into [`NodeTypesWithDB`]. | ||
#[derive(Clone, Debug, Default)] | ||
pub struct NodeTypesWithDBAdapter<Types, DB> { |
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.
rip bozo
f6853b7
to
9bad524
Compare
7398197
to
9c785bd
Compare
Closes: #15507