Search in sources :

Example 6 with HashMapBackingTokens

use of com.hedera.services.ledger.backing.HashMapBackingTokens in project hedera-services by hashgraph.

the class HederaLedgerLiveTest method setup.

@BeforeEach
void setup() {
    commonSetup();
    accountsLedger = new TransactionalLedger<>(AccountProperty.class, MerkleAccount::new, new HashMapBackingAccounts(), new ChangeSummaryManager<>());
    accountsLedger.setCommitInterceptor(accountsCommitInterceptor);
    nftsLedger = new TransactionalLedger<>(NftProperty.class, MerkleUniqueToken::new, new HashMapBackingNfts(), new ChangeSummaryManager<>());
    nftsLedger.setCommitInterceptor(uniqueTokensCommitInterceptor);
    tokenRelsLedger = new TransactionalLedger<>(TokenRelProperty.class, MerkleTokenRelStatus::new, new HashMapBackingTokenRels(), new ChangeSummaryManager<>());
    tokenRelsLedger.setKeyToString(BackingTokenRels::readableTokenRel);
    tokenRelsLedger.setCommitInterceptor(tokenRelsCommitInterceptor);
    tokenStore = new HederaTokenStore(ids, TestContextValidator.TEST_VALIDATOR, liveSideEffects, new MockGlobalDynamicProps(), tokenRelsLedger, nftsLedger, new HashMapBackingTokens());
    subject = new HederaLedger(tokenStore, ids, creator, validator, liveSideEffects, historian, dynamicProps, accountsLedger, transferLogic, autoCreationLogic);
    subject.setMutableEntityAccess(mock(MutableEntityAccess.class));
}
Also used : HashMapBackingTokenRels(com.hedera.services.ledger.backing.HashMapBackingTokenRels) NftProperty(com.hedera.services.ledger.properties.NftProperty) BackingTokenRels(com.hedera.services.ledger.backing.BackingTokenRels) HashMapBackingTokenRels(com.hedera.services.ledger.backing.HashMapBackingTokenRels) AccountProperty(com.hedera.services.ledger.properties.AccountProperty) TokenRelProperty(com.hedera.services.ledger.properties.TokenRelProperty) HashMapBackingNfts(com.hedera.services.ledger.backing.HashMapBackingNfts) HederaTokenStore(com.hedera.services.store.tokens.HederaTokenStore) ChangeSummaryManager(com.hedera.services.ledger.properties.ChangeSummaryManager) HashMapBackingTokens(com.hedera.services.ledger.backing.HashMapBackingTokens) MockGlobalDynamicProps(com.hedera.services.config.MockGlobalDynamicProps) HashMapBackingAccounts(com.hedera.services.ledger.backing.HashMapBackingAccounts) MutableEntityAccess(com.hedera.services.store.contracts.MutableEntityAccess) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

HashMapBackingTokens (com.hedera.services.ledger.backing.HashMapBackingTokens)6 HashMapBackingAccounts (com.hedera.services.ledger.backing.HashMapBackingAccounts)5 HashMapBackingNfts (com.hedera.services.ledger.backing.HashMapBackingNfts)5 HashMapBackingTokenRels (com.hedera.services.ledger.backing.HashMapBackingTokenRels)5 TransactionalLedger (com.hedera.services.ledger.TransactionalLedger)4 MerkleAccount (com.hedera.services.state.merkle.MerkleAccount)4 MerkleToken (com.hedera.services.state.merkle.MerkleToken)4 MerkleTokenRelStatus (com.hedera.services.state.merkle.MerkleTokenRelStatus)4 MerkleUniqueToken (com.hedera.services.state.merkle.MerkleUniqueToken)4 Test (org.junit.jupiter.api.Test)3 AliasManager (com.hedera.services.ledger.accounts.AliasManager)2 StackedContractAliases (com.hedera.services.ledger.accounts.StackedContractAliases)2 HederaTokenStore (com.hedera.services.store.tokens.HederaTokenStore)2 MockGlobalDynamicProps (com.hedera.services.config.MockGlobalDynamicProps)1 SideEffectsTracker (com.hedera.services.context.SideEffectsTracker)1 BackingTokenRels (com.hedera.services.ledger.backing.BackingTokenRels)1 AccountProperty (com.hedera.services.ledger.properties.AccountProperty)1 ChangeSummaryManager (com.hedera.services.ledger.properties.ChangeSummaryManager)1 NftProperty (com.hedera.services.ledger.properties.NftProperty)1 TokenRelProperty (com.hedera.services.ledger.properties.TokenRelProperty)1