Search in sources :

Example 1 with RepositoryTrack

use of org.ethereum.db.RepositoryTrack in project rskj by rsksmart.

the class TransactionPoolImplTest method usingRepository.

@Test
public void usingRepository() {
    TransactionPoolImpl transactionPool = createSampleNewTransactionPool(createBlockchain());
    Repository repository = transactionPool.getRepository();
    Assert.assertNotNull(repository);
    Assert.assertTrue(repository instanceof RepositoryTrack);
}
Also used : Repository(org.ethereum.core.Repository) RepositoryTrack(org.ethereum.db.RepositoryTrack) Test(org.junit.Test)

Example 2 with RepositoryTrack

use of org.ethereum.db.RepositoryTrack in project rskj by rsksmart.

the class ProgramTrace method getContractDetails.

private static ContractDetails getContractDetails(ProgramInvoke programInvoke) {
    Repository repository = programInvoke.getRepository();
    if (repository instanceof RepositoryTrack) {
        repository = ((RepositoryTrack) repository).getOriginRepository();
    }
    RskAddress addr = new RskAddress(programInvoke.getOwnerAddress());
    return repository.getContractDetails(addr);
}
Also used : Repository(org.ethereum.core.Repository) RskAddress(co.rsk.core.RskAddress) RepositoryTrack(org.ethereum.db.RepositoryTrack)

Aggregations

Repository (org.ethereum.core.Repository)2 RepositoryTrack (org.ethereum.db.RepositoryTrack)2 RskAddress (co.rsk.core.RskAddress)1 Test (org.junit.Test)1