1010use openssl as _; // silences clippy warning
1111
1212use init4_bin_base:: utils:: from_env:: FromEnv ;
13- use reth:: providers:: { ProviderFactory , StateProviderFactory , providers :: BlockchainProvider } ;
14- use signet_node:: SignetNode ;
13+ use reth:: providers:: ProviderFactory ;
14+ use signet_node:: SignetNodeBuilder ;
1515use signet_node_config:: SignetNodeConfig ;
1616use std:: sync:: { Arc , LazyLock } ;
1717
@@ -27,8 +27,6 @@ pub fn node_from_env() -> eyre::Result<()> {
2727/// State the Signet node, using the provided config.
2828pub fn node ( config : SignetNodeConfig ) -> eyre:: Result < ( ) > {
2929 reth:: cli:: Cli :: parse_args ( ) . run ( |builder, _| async move {
30- let db_args = reth_db:: mdbx:: DatabaseArguments :: default ( ) ;
31-
3230 let prune_config = builder. config ( ) . prune_config ( ) ;
3331
3432 let handle = builder
@@ -40,18 +38,18 @@ pub fn node(config: SignetNodeConfig) -> eyre::Result<()> {
4038 let mut factory = ProviderFactory :: new_with_database_path (
4139 config. database_path ( ) ,
4240 chain_spec,
43- db_args ,
41+ Default :: default ( ) ,
4442 config. static_file_rw ( ) ?,
4543 ) ?;
4644 if let Some ( prune_config) = prune_config {
4745 factory = factory. with_prune_modes ( prune_config. segments ) ;
4846 }
4947
50- // This allows the node to look up contract status.
51- let boxed_factory : Box < dyn StateProviderFactory > =
52- Box :: new ( BlockchainProvider :: new ( factory . clone ( ) ) ? ) ;
53-
54- Ok ( SignetNode :: new ( ctx , config , factory . clone ( ) , boxed_factory , CLIENT . clone ( ) ) ?
48+ Ok ( SignetNodeBuilder :: new ( config )
49+ . with_factory ( factory . clone ( ) )
50+ . with_ctx ( ctx )
51+ . with_client ( CLIENT . clone ( ) )
52+ . build ( ) ?
5553 . 0
5654 . start ( ) )
5755 } )
0 commit comments