Search in sources :

Example 1 with ReceiptStoreImplV2

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

the class RskContext method buildReceiptStore.

protected synchronized ReceiptStore buildReceiptStore() {
    checkIfNotClosed();
    int receiptsCacheSize = getRskSystemProperties().getReceiptsCacheSize();
    KeyValueDataSource ds = LevelDbDataSource.makeDataSource(Paths.get(getRskSystemProperties().databaseDir(), "receipts"));
    if (receiptsCacheSize != 0) {
        ds = new DataSourceWithCache(ds, receiptsCacheSize);
    }
    return new ReceiptStoreImplV2(ds);
}
Also used : DataSourceWithCache(org.ethereum.datasource.DataSourceWithCache) ReceiptStoreImplV2(org.ethereum.db.ReceiptStoreImplV2) KeyValueDataSource(org.ethereum.datasource.KeyValueDataSource)

Aggregations

DataSourceWithCache (org.ethereum.datasource.DataSourceWithCache)1 KeyValueDataSource (org.ethereum.datasource.KeyValueDataSource)1 ReceiptStoreImplV2 (org.ethereum.db.ReceiptStoreImplV2)1