Search in sources :

Example 11 with MicroKernelBootstrap

use of io.nuls.kernel.MicroKernelBootstrap in project nuls by nuls-io.

the class TransactionCacheStorageServiceTest method init.

@Before
public void init() {
    try {
        MicroKernelBootstrap mk = MicroKernelBootstrap.getInstance();
        mk.init();
        mk.start();
        LevelDbModuleBootstrap bootstrap = new LevelDbModuleBootstrap();
        bootstrap.init();
        bootstrap.start();
        service = NulsContext.getServiceBean(TransactionCacheStorageService.class);
    } catch (Exception e) {
        Log.error(e);
    }
}
Also used : LevelDbModuleBootstrap(io.nuls.db.module.impl.LevelDbModuleBootstrap) MicroKernelBootstrap(io.nuls.kernel.MicroKernelBootstrap) Before(org.junit.Before)

Example 12 with MicroKernelBootstrap

use of io.nuls.kernel.MicroKernelBootstrap in project nuls by nuls-io.

the class TransactionServiceImplTest method init.

@Before
public void init() {
    MicroKernelBootstrap mk = MicroKernelBootstrap.getInstance();
    mk.init();
    mk.start();
    LevelDbModuleBootstrap bootstrap = new LevelDbModuleBootstrap();
    bootstrap.init();
    bootstrap.start();
    UtxoLedgerModuleBootstrap ledgerModuleBootstrap = new UtxoLedgerModuleBootstrap();
    ledgerModuleBootstrap.init();
    ledgerModuleBootstrap.start();
    NettyNetworkModuleBootstrap networkModuleBootstrap = new NettyNetworkModuleBootstrap();
    networkModuleBootstrap.init();
    networkModuleBootstrap.start();
    transactionService = SpringLiteContext.getBean(TransactionService.class);
    initTxList();
}
Also used : LevelDbModuleBootstrap(io.nuls.db.module.impl.LevelDbModuleBootstrap) TransactionService(io.nuls.protocol.service.TransactionService) UtxoLedgerModuleBootstrap(io.nuls.ledger.module.impl.UtxoLedgerModuleBootstrap) NettyNetworkModuleBootstrap(io.nuls.network.netty.module.impl.NettyNetworkModuleBootstrap) MicroKernelBootstrap(io.nuls.kernel.MicroKernelBootstrap) Before(org.junit.Before)

Example 13 with MicroKernelBootstrap

use of io.nuls.kernel.MicroKernelBootstrap in project nuls by nuls-io.

the class AccountBaseServiceTest method beforeTest.

@BeforeClass
public static void beforeTest() {
    MicroKernelBootstrap kernel = MicroKernelBootstrap.getInstance();
    kernel.init();
    kernel.start();
    accountService = SpringLiteContext.getBean(AccountService.class);
    accountBaseService = SpringLiteContext.getBean(AccountBaseService.class);
}
Also used : MicroKernelBootstrap(io.nuls.kernel.MicroKernelBootstrap) BeforeClass(org.junit.BeforeClass)

Aggregations

MicroKernelBootstrap (io.nuls.kernel.MicroKernelBootstrap)13 LevelDbModuleBootstrap (io.nuls.db.module.impl.LevelDbModuleBootstrap)7 Before (org.junit.Before)6 BeforeClass (org.junit.BeforeClass)4 NulsDigestData (io.nuls.kernel.model.NulsDigestData)3 Block (io.nuls.kernel.model.Block)2 BlockSignature (io.nuls.kernel.script.BlockSignature)2 UtxoLedgerModuleBootstrap (io.nuls.ledger.module.impl.UtxoLedgerModuleBootstrap)2 NettyNetworkModuleBootstrap (io.nuls.network.netty.module.impl.NettyNetworkModuleBootstrap)2 ArrayList (java.util.ArrayList)2 ShutdownHook (io.nuls.client.rpc.resources.thread.ShutdownHook)1 LanguageService (io.nuls.client.storage.LanguageService)1 WebViewBootstrap (io.nuls.client.web.view.WebViewBootstrap)1 BaseTest (io.nuls.consensus.poc.BaseTest)1 NulsContext (io.nuls.kernel.context.NulsContext)1 BlockHeader (io.nuls.kernel.model.BlockHeader)1 MessageBusModuleBootstrap (io.nuls.message.bus.module.MessageBusModuleBootstrap)1 Node (io.nuls.network.model.Node)1 NetworkService (io.nuls.network.service.NetworkService)1 BaseProtocolsModuleBootstrap (io.nuls.protocol.base.module.BaseProtocolsModuleBootstrap)1