Search in sources :

Example 6 with LevelDbModuleBootstrap

use of io.nuls.db.module.impl.LevelDbModuleBootstrap 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 7 with LevelDbModuleBootstrap

use of io.nuls.db.module.impl.LevelDbModuleBootstrap 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)

Aggregations

LevelDbModuleBootstrap (io.nuls.db.module.impl.LevelDbModuleBootstrap)7 MicroKernelBootstrap (io.nuls.kernel.MicroKernelBootstrap)7 Before (org.junit.Before)6 NulsDigestData (io.nuls.kernel.model.NulsDigestData)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 Block (io.nuls.kernel.model.Block)1 BlockHeader (io.nuls.kernel.model.BlockHeader)1 MessageBusModuleBootstrap (io.nuls.message.bus.module.MessageBusModuleBootstrap)1 BaseProtocolsModuleBootstrap (io.nuls.protocol.base.module.BaseProtocolsModuleBootstrap)1 BlockService (io.nuls.protocol.service.BlockService)1 TransactionService (io.nuls.protocol.service.TransactionService)1 BlockHeaderPo (io.nuls.protocol.storage.po.BlockHeaderPo)1 BlockHeaderStorageService (io.nuls.protocol.storage.service.BlockHeaderStorageService)1 BeforeClass (org.junit.BeforeClass)1