Search in sources :

Example 1 with NetworkService

use of io.nuls.network.service.NetworkService in project nuls by nuls-io.

the class NetworkModuleBootstrap method init.

@Override
public void init() {
    this.registerEvent();
    try {
        NetworkContext.setNetworkConfig(ConfigLoader.loadProperties(NetworkConstant.NETWORK_PROPERTIES));
    } catch (IOException e) {
        Log.error(e);
        throw new NulsRuntimeException(ErrorCode.IO_ERROR);
    }
    this.registerService(NetworkServiceImpl.class);
    networkService = NulsContext.getServiceBean(NetworkService.class);
}
Also used : NulsRuntimeException(io.nuls.core.exception.NulsRuntimeException) NetworkService(io.nuls.network.service.NetworkService) IOException(java.io.IOException)

Aggregations

NulsRuntimeException (io.nuls.core.exception.NulsRuntimeException)1 NetworkService (io.nuls.network.service.NetworkService)1 IOException (java.io.IOException)1