Search in sources :

Example 1 with TestAccountCommitInterceptor

use of com.hedera.services.ledger.properties.TestAccountCommitInterceptor in project hedera-services by hashgraph.

the class TransactionalLedgerTest method setup.

@BeforeEach
private void setup() {
    scopedCheck = new TestAccountScopedCheck();
    accountsLedger = new TransactionalLedger<>(AccountProperty.class, MerkleAccount::new, backingAccounts, new ChangeSummaryManager<>());
    final var accountsCommitInterceptor = new AccountsCommitInterceptor(new SideEffectsTracker());
    accountsLedger.setCommitInterceptor(accountsCommitInterceptor);
    subject = new TransactionalLedger<>(TestAccountProperty.class, TestAccount::new, backingTestAccounts, changeManager);
    final var testAccountCommitInterceptor = new TestAccountCommitInterceptor(new SideEffectsTracker());
    subject.setCommitInterceptor(testAccountCommitInterceptor);
}
Also used : ChangeSummaryManager(com.hedera.services.ledger.properties.ChangeSummaryManager) SideEffectsTracker(com.hedera.services.context.SideEffectsTracker) TestAccountProperty(com.hedera.services.ledger.properties.TestAccountProperty) TestAccountCommitInterceptor(com.hedera.services.ledger.properties.TestAccountCommitInterceptor) TestAccountProperty(com.hedera.services.ledger.properties.TestAccountProperty) AccountProperty(com.hedera.services.ledger.properties.AccountProperty) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

SideEffectsTracker (com.hedera.services.context.SideEffectsTracker)1 AccountProperty (com.hedera.services.ledger.properties.AccountProperty)1 ChangeSummaryManager (com.hedera.services.ledger.properties.ChangeSummaryManager)1 TestAccountCommitInterceptor (com.hedera.services.ledger.properties.TestAccountCommitInterceptor)1 TestAccountProperty (com.hedera.services.ledger.properties.TestAccountProperty)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1