@Test public void testNoopPruneManager() throws Exception { DefaultConfig defaultConfig = new DefaultConfig(); defaultConfig.config = new SystemProperties(); defaultConfig.config.overrideParams("database.prune.enabled", "false"); PruneManager noopPruneManager = defaultConfig.pruneManager(); noopPruneManager.blockCommitted(null); }
@Bean public PruneManager pruneManager() { if (config.databasePruneDepth() >= 0) { return new PruneManager((IndexedBlockStore) blockStore(), commonConfig.stateSource().getJournalSource(), commonConfig.stateSource().getNoJournalSource(), config.databasePruneDepth()); } else { return new PruneManager(null, null, null, -1); } }
DefaultConfig { @Bean public PruneManager pruneManager() { if (config.databasePruneDepth() >= 0) { return new PruneManager((IndexedBlockStore) blockStore(), commonConfig.stateSource().getJournalSource(), commonConfig.stateSource().getNoJournalSource(), config.databasePruneDepth()); } else { return new PruneManager(null, null, null, -1); } } }
DefaultConfig { @Bean public PruneManager pruneManager() { if (config.databasePruneDepth() >= 0) { return new PruneManager((IndexedBlockStore) blockStore(), commonConfig.stateSource().getJournalSource(), commonConfig.stateSource().getNoJournalSource(), config.databasePruneDepth()); } else { return new PruneManager(null, null, null, -1); } } DefaultConfig(); }
DefaultConfig { @Bean public PruneManager pruneManager() { if (config.databasePruneDepth() >= 0) { return new PruneManager((IndexedBlockStore) blockStore(), commonConfig.stateSource().getJournalSource(), commonConfig.stateSource().getNoJournalSource(), config.databasePruneDepth()); } else { return new PruneManager(null, null, null, -1); } } DefaultConfig(); @Bean BlockStore blockStore(); @Bean TransactionStore transactionStore(); @Bean PruneManager pruneManager(); }
DefaultConfig { @Bean public PruneManager pruneManager() { if (config.databasePruneDepth() >= 0) { return new PruneManager((IndexedBlockStore) blockStore(), commonConfig.stateSource().getJournalSource(), commonConfig.stateSource().getNoJournalSource(), config.databasePruneDepth()); } else { return new PruneManager(null, null, null, -1); } } DefaultConfig(); @Bean BlockStore blockStore(); @Bean TransactionStore transactionStore(); @Bean PruneManager pruneManager();  }