use of com.radixdlt.network.p2p.NoOpPeerControl in project radixdlt by radixdlt.
the class PersistedNodeForTestingModule method configure.
@Override
public void configure() {
bind(Addressing.class).toInstance(Addressing.ofNetwork(Network.LOCALNET));
bind(SyncConfig.class).toInstance(SyncConfig.of(500, 10, 3000, 10, Long.MAX_VALUE));
bind(Integer.class).annotatedWith(BFTSyncPatienceMillis.class).toInstance(200);
bind(Long.class).annotatedWith(PacemakerTimeout.class).toInstance(1000L);
bind(Double.class).annotatedWith(PacemakerRate.class).toInstance(2.0);
bind(Integer.class).annotatedWith(PacemakerMaxExponent.class).toInstance(6);
bind(RateLimiter.class).annotatedWith(GetVerticesRequestRateLimit.class).toInstance(RateLimiter.create(Double.MAX_VALUE));
bindConstant().annotatedWith(DatabaseCacheSize.class).to((long) (Runtime.getRuntime().maxMemory() * 0.125));
// System
bind(SystemCounters.class).to(SystemCountersImpl.class).in(Scopes.SINGLETON);
bind(TimeSupplier.class).toInstance(System::currentTimeMillis);
// P2P
bind(PeerControl.class).toInstance(new NoOpPeerControl());
install(new InMemoryBFTKeyModule());
install(new CryptoModule());
install(new FunctionalNodeModule());
install(new RadixEngineStoreModule());
install(new PersistenceModule());
install(new ConsensusRecoveryModule());
install(new LedgerRecoveryModule());
}
use of com.radixdlt.network.p2p.NoOpPeerControl in project radixdlt by radixdlt.
the class PersistedNodeForTestingModule method configure.
@Override
public void configure() {
bind(Addressing.class).toInstance(Addressing.ofNetwork(Network.LOCALNET));
bind(SyncConfig.class).toInstance(SyncConfig.of(500, 10, 3000, 10, Long.MAX_VALUE));
bind(Integer.class).annotatedWith(BFTSyncPatienceMillis.class).toInstance(200);
bind(Long.class).annotatedWith(PacemakerTimeout.class).toInstance(1000L);
bind(Double.class).annotatedWith(PacemakerRate.class).toInstance(2.0);
bind(Integer.class).annotatedWith(PacemakerMaxExponent.class).toInstance(6);
bind(RateLimiter.class).annotatedWith(GetVerticesRequestRateLimit.class).toInstance(RateLimiter.create(Double.MAX_VALUE));
bindConstant().annotatedWith(DatabaseCacheSize.class).to((long) (Runtime.getRuntime().maxMemory() * 0.125));
// System
bind(SystemCounters.class).to(SystemCountersImpl.class).in(Scopes.SINGLETON);
bind(TimeSupplier.class).toInstance(System::currentTimeMillis);
// P2P
bind(PeerControl.class).toInstance(new NoOpPeerControl());
install(new InMemoryBFTKeyModule());
install(new CryptoModule());
install(new FunctionalNodeModule());
install(new RadixEngineStoreModule());
install(new PersistenceModule());
install(new ConsensusRecoveryModule());
install(new LedgerRecoveryModule());
}
Aggregations