forked from tronprotocol/java-tron
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFullNode.java
More file actions
34 lines (30 loc) · 1.05 KB
/
FullNode.java
File metadata and controls
34 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.tron.program;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tron.common.application.Application;
import org.tron.common.application.ApplicationFactory;
import org.tron.core.services.RpcApiService;
import org.tron.core.services.WitnessService;
public class FullNode {
private static final Logger logger = LoggerFactory.getLogger("FullNode");
/**
* Start the FullNode.
*/
public static void main(String[] args) {
Args.setParam(args);
Args cfgArgs = Args.getInstance();
if (cfgArgs.isHelp()) {
logger.info("Here is the help message.");
return;
}
logger.info("Here is the help message." + cfgArgs.getOutputDirectory());
Application appT = ApplicationFactory.create();
appT.init(cfgArgs.getOutputDirectory(), cfgArgs);
RpcApiService rpcApiService = new RpcApiService(appT);
appT.addService(rpcApiService);
appT.addService(new WitnessService(appT));
appT.startServices();
appT.startup();
rpcApiService.blockUntilShutdown();
}
}