-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move node's main functionality into a public function
- Loading branch information
1 parent
f8a57da
commit 490bf56
Showing
4 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ pub mod communication; | |
pub mod components; | ||
pub mod config; | ||
pub mod servers; | ||
pub mod utils; | ||
pub mod version; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use crate::communication::{create_node_channels, create_node_clients, MempoolNodeClients}; | ||
use crate::components::create_components; | ||
use crate::config::MempoolNodeConfig; | ||
use crate::servers::{create_servers, Servers}; | ||
|
||
pub fn create_clients_servers_from_config( | ||
config: &MempoolNodeConfig, | ||
) -> (MempoolNodeClients, Servers) { | ||
let mut channels = create_node_channels(); | ||
let clients = create_node_clients(config, &mut channels); | ||
let components = create_components(config, &clients); | ||
let servers = create_servers(config, &mut channels, components); | ||
|
||
(clients, servers) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters