14
14
* limitations under the License.
15
15
*/
16
16
17
+ use exonum_explorer_service:: ExplorerFactory ;
17
18
use exonum_supervisor:: { mode:: Mode as SupervisorMode , Supervisor } ;
18
19
use exonum_time:: TimeServiceFactory ;
19
20
use java_bindings:: {
@@ -25,13 +26,12 @@ use java_bindings::{
25
26
} ,
26
27
exonum_merkledb:: { Database , RocksDB } ,
27
28
node:: { ApiSender , Node , NodeChannel , NodeConfig as CoreNodeConfig } ,
28
- runtime:: rust:: { RustRuntime , ServiceFactory } ,
29
+ runtime:: rust:: { DefaultInstance , RustRuntime , RustRuntimeBuilder , ServiceFactory } ,
29
30
} ,
30
31
Command , Config , DefaultConfigManager , EjbCommand , EjbCommandResult , Executor , InternalConfig ,
31
32
JavaRuntimeProxy ,
32
33
} ;
33
34
34
- use java_bindings:: exonum:: runtime:: rust:: RustRuntimeBuilder ;
35
35
use std:: sync:: Arc ;
36
36
37
37
pub fn run_node ( command : Command ) -> Result < ( ) , failure:: Error > {
@@ -74,6 +74,8 @@ fn create_blockchain(
74
74
let genesis_config = GenesisConfigBuilder :: with_consensus_config ( node_config. consensus )
75
75
. with_artifact ( Supervisor . artifact_id ( ) )
76
76
. with_instance ( supervisor_service)
77
+ . with_artifact ( ExplorerFactory . artifact_id ( ) )
78
+ . with_instance ( ExplorerFactory . default_instance ( ) )
77
79
. build ( ) ;
78
80
79
81
let rust_runtime = create_rust_runtime ( channel) ;
@@ -89,6 +91,7 @@ fn create_rust_runtime(channel: &NodeChannel) -> RustRuntime {
89
91
RustRuntimeBuilder :: new ( )
90
92
. with_factory ( TimeServiceFactory :: default ( ) )
91
93
. with_factory ( Supervisor )
94
+ . with_factory ( ExplorerFactory )
92
95
. build ( channel. endpoints . 0 . clone ( ) )
93
96
}
94
97
0 commit comments