essential-contributions / essential-node

Derive current head from essential builder and sync state between nodes
Apache License 2.0
2 stars 1 forks source link

refactor: Move the `node::db` module into `node_db::pool` #115

Closed mitchmindtree closed 3 weeks ago

mitchmindtree commented 1 month ago

Previously, the node's ConnectionPool type was defined in the essential-node crate's db module. This moves the implementation to a feature-gated pool module within the essential-node-db crate.

This give downstream crates the ability to use the node connection pool abstraction without also needing to include all of the stream stuff from essential-node.

Now that the essential_node::db module is removed, we instead re-export essential-node-db as essential_node::db, ensuring users of the node have access to everything they could need from the node DB without having to import the extra crate.

Also updates essential-relayer to take advantage of the node's ConnectionPool now that it is located in essential-node-db.

Closes #74.

Edit: I'll wait for #113 to land then rebase before merging as there might be a couple conflicts.