Search in sources :

Example 11 with MutableStateChildren

use of com.hedera.services.context.MutableStateChildren in project hedera-services by hashgraph.

the class GetAccountRecordsAnswerTest method setup.

@BeforeEach
private void setup() throws Exception {
    payerAccount = MerkleAccountFactory.newAccount().accountKeys(COMPLEX_KEY_ACCOUNT_KT).proxy(asAccount("1.2.3")).senderThreshold(1_234L).receiverThreshold(4_321L).receiverSigRequired(true).balance(555L).autoRenewPeriod(1_000_000L).expirationTime(9_999_999L).get();
    payerAccount.records().offer(recordOne());
    payerAccount.records().offer(recordTwo());
    accounts = mock(MerkleMap.class);
    given(accounts.get(EntityNum.fromAccountId(asAccount(target)))).willReturn(payerAccount);
    final MutableStateChildren children = new MutableStateChildren();
    children.setAccounts(accounts);
    view = new StateView(null, null, children, null);
    optionValidator = mock(OptionValidator.class);
    subject = new GetAccountRecordsAnswer(new AnswerFunctions(dynamicProperties), optionValidator);
}
Also used : MutableStateChildren(com.hedera.services.context.MutableStateChildren) OptionValidator(com.hedera.services.txns.validation.OptionValidator) MerkleMap(com.swirlds.merkle.map.MerkleMap) StateView(com.hedera.services.context.primitives.StateView) AnswerFunctions(com.hedera.services.queries.answering.AnswerFunctions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

MutableStateChildren (com.hedera.services.context.MutableStateChildren)11 StateView (com.hedera.services.context.primitives.StateView)10 BeforeEach (org.junit.jupiter.api.BeforeEach)9 MerkleMap (com.swirlds.merkle.map.MerkleMap)7 NodeLocalProperties (com.hedera.services.context.properties.NodeLocalProperties)4 AnswerFunctions (com.hedera.services.queries.answering.AnswerFunctions)4 OptionValidator (com.hedera.services.txns.validation.OptionValidator)4 MerkleTokenRelStatus (com.hedera.services.state.merkle.MerkleTokenRelStatus)3 NetworkInfo (com.hedera.services.config.NetworkInfo)2 RecordCache (com.hedera.services.records.RecordCache)2 MerkleToken (com.hedera.services.state.merkle.MerkleToken)2 ScheduleStore (com.hedera.services.store.schedule.ScheduleStore)2 TokenStore (com.hedera.services.store.tokens.TokenStore)2 EntityNum (com.hedera.services.utils.EntityNum)2 HFileMeta (com.hedera.services.files.HFileMeta)1 AliasManager (com.hedera.services.ledger.accounts.AliasManager)1 MerkleAccount (com.hedera.services.state.merkle.MerkleAccount)1 MerkleAccountTokens (com.hedera.services.state.merkle.MerkleAccountTokens)1 MerkleSpecialFiles (com.hedera.services.state.merkle.MerkleSpecialFiles)1 MerkleTopic (com.hedera.services.state.merkle.MerkleTopic)1