Search in sources :

Example 1 with CommonConfig

use of org.ethereum.config.CommonConfig in project rskj by rsksmart.

the class CommonConfigTest method createRepositoryUsingNewRepository.

@Test
public void createRepositoryUsingNewRepository() {
    CommonConfig config = new CommonConfig();
    Repository repository = config.repository(this.config);
    Assert.assertNotNull(repository);
    Assert.assertTrue(repository instanceof RepositoryImpl);
}
Also used : Repository(org.ethereum.core.Repository) RepositoryImpl(co.rsk.db.RepositoryImpl) CommonConfig(org.ethereum.config.CommonConfig) Test(org.junit.Test)

Example 2 with CommonConfig

use of org.ethereum.config.CommonConfig in project rskj by rsksmart.

the class CommonConfigTest method createParentHeaderValidator.

@Test
public void createParentHeaderValidator() {
    CommonConfig config = new CommonConfig();
    ParentBlockHeaderValidator result = config.parentHeaderValidator(this.config, new DifficultyCalculator(this.config));
    Assert.assertNotNull(result);
}
Also used : DifficultyCalculator(co.rsk.core.DifficultyCalculator) CommonConfig(org.ethereum.config.CommonConfig) ParentBlockHeaderValidator(org.ethereum.validator.ParentBlockHeaderValidator) Test(org.junit.Test)

Example 3 with CommonConfig

use of org.ethereum.config.CommonConfig in project rskj by rsksmart.

the class CommonConfigTest method createTransactionPoolTransactions.

@Test
public void createTransactionPoolTransactions() {
    CommonConfig config = new CommonConfig();
    List<Transaction> result = config.transactionPoolTransactions();
    Assert.assertNotNull(result);
    Assert.assertTrue(result.isEmpty());
}
Also used : Transaction(org.ethereum.core.Transaction) CommonConfig(org.ethereum.config.CommonConfig) Test(org.junit.Test)

Aggregations

CommonConfig (org.ethereum.config.CommonConfig)3 Test (org.junit.Test)3 DifficultyCalculator (co.rsk.core.DifficultyCalculator)1 RepositoryImpl (co.rsk.db.RepositoryImpl)1 Repository (org.ethereum.core.Repository)1 Transaction (org.ethereum.core.Transaction)1 ParentBlockHeaderValidator (org.ethereum.validator.ParentBlockHeaderValidator)1