Search in sources :

Example 1 with MockedSyncServiceModule

use of com.radixdlt.sync.MockedSyncServiceModule in project radixdlt by radixdlt.

the class FunctionalNodeModule method configure.

@Override
public void configure() {
    install(new EventLoggerModule());
    install(new DispatcherModule());
    // Consensus
    if (hasConsensus) {
        install(new ConsensusModule());
        if (hasEpochs) {
            install(new EpochsConsensusModule());
        } else {
            install(new NoEpochsConsensusModule());
        }
    }
    // Sync
    if (hasLedger) {
        if (!hasSync) {
            install(mockedSyncServiceModule);
        } else {
            install(new SyncServiceModule());
            if (hasEpochs) {
                install(new EpochsSyncModule());
            } else {
                install(new NoEpochsSyncModule());
            }
        }
    }
    // State Manager
    if (!hasLedger) {
        install(new MockedLedgerModule());
    } else {
        install(new LedgerModule());
        if (!hasMempool) {
            install(new MockedCommandGeneratorModule());
            if (!hasEpochs) {
                install(new MockedStateComputerModule());
            } else {
                install(new MockedStateComputerWithEpochsModule());
            }
        } else {
            install(new MempoolReceiverModule());
            if (hasMempoolRelayer) {
                install(new MempoolRelayerModule());
            }
            if (!hasRadixEngine) {
                install(new MockedMempoolStateComputerModule());
            } else {
                install(new RadixEngineStateComputerModule());
                install(new RadixEngineModule());
                install(new RadixEngineCheckpointModule());
            }
        }
    }
}
Also used : RadixEngineModule(com.radixdlt.statecomputer.RadixEngineModule) MockedStateComputerWithEpochsModule(com.radixdlt.statecomputer.MockedStateComputerWithEpochsModule) NoEpochsConsensusModule(com.radixdlt.environment.NoEpochsConsensusModule) MockedSyncServiceModule(com.radixdlt.sync.MockedSyncServiceModule) RadixEngineStateComputerModule(com.radixdlt.statecomputer.RadixEngineStateComputerModule) NoEpochsConsensusModule(com.radixdlt.environment.NoEpochsConsensusModule) MockedLedgerModule(com.radixdlt.ledger.MockedLedgerModule) MockedStateComputerModule(com.radixdlt.statecomputer.MockedStateComputerModule) MockedLedgerModule(com.radixdlt.ledger.MockedLedgerModule) MempoolRelayerModule(com.radixdlt.mempool.MempoolRelayerModule) MockedCommandGeneratorModule(com.radixdlt.ledger.MockedCommandGeneratorModule) RadixEngineCheckpointModule(com.radixdlt.statecomputer.checkpoint.RadixEngineCheckpointModule) MockedMempoolStateComputerModule(com.radixdlt.statecomputer.MockedMempoolStateComputerModule) NoEpochsSyncModule(com.radixdlt.environment.NoEpochsSyncModule) NoEpochsConsensusModule(com.radixdlt.environment.NoEpochsConsensusModule) NoEpochsSyncModule(com.radixdlt.environment.NoEpochsSyncModule) MempoolReceiverModule(com.radixdlt.mempool.MempoolReceiverModule)

Aggregations

NoEpochsConsensusModule (com.radixdlt.environment.NoEpochsConsensusModule)1 NoEpochsSyncModule (com.radixdlt.environment.NoEpochsSyncModule)1 MockedCommandGeneratorModule (com.radixdlt.ledger.MockedCommandGeneratorModule)1 MockedLedgerModule (com.radixdlt.ledger.MockedLedgerModule)1 MempoolReceiverModule (com.radixdlt.mempool.MempoolReceiverModule)1 MempoolRelayerModule (com.radixdlt.mempool.MempoolRelayerModule)1 MockedMempoolStateComputerModule (com.radixdlt.statecomputer.MockedMempoolStateComputerModule)1 MockedStateComputerModule (com.radixdlt.statecomputer.MockedStateComputerModule)1 MockedStateComputerWithEpochsModule (com.radixdlt.statecomputer.MockedStateComputerWithEpochsModule)1 RadixEngineModule (com.radixdlt.statecomputer.RadixEngineModule)1 RadixEngineStateComputerModule (com.radixdlt.statecomputer.RadixEngineStateComputerModule)1 RadixEngineCheckpointModule (com.radixdlt.statecomputer.checkpoint.RadixEngineCheckpointModule)1 MockedSyncServiceModule (com.radixdlt.sync.MockedSyncServiceModule)1