mirror of
https://github.com/corda/corda.git
synced 2025-06-17 14:48:16 +00:00
CORDA-1096 - Performance when loading multiple states from the vault (#2614)
* CORDA-1096 - Performance when loading multiple states from the vault (#2609) * Provide efficient `loadStates()` implementation * Replace loops using `loadState` with calls to `loadStates` * Replace `map`/`flatMap` with just a single `flatMap`
This commit is contained in:
@ -2,10 +2,7 @@ package net.corda.node.services
|
||||
|
||||
import com.nhaarman.mockito_kotlin.doReturn
|
||||
import com.nhaarman.mockito_kotlin.whenever
|
||||
import net.corda.core.contracts.Contract
|
||||
import net.corda.core.contracts.PartyAndReference
|
||||
import net.corda.core.contracts.StateRef
|
||||
import net.corda.core.contracts.TransactionState
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.cordapp.CordappProvider
|
||||
import net.corda.core.flows.FlowLogic
|
||||
import net.corda.core.flows.UnexpectedFlowEndException
|
||||
@ -87,6 +84,7 @@ class AttachmentLoadingTests {
|
||||
|
||||
private val services = object : ServicesForResolution {
|
||||
override fun loadState(stateRef: StateRef): TransactionState<*> = throw NotImplementedError()
|
||||
override fun loadStates(stateRefs: Set<StateRef>): Set<StateAndRef<ContractState>> = throw NotImplementedError()
|
||||
override val identityService = rigorousMock<IdentityService>().apply {
|
||||
doReturn(null).whenever(this).partyFromKey(DUMMY_BANK_A.owningKey)
|
||||
}
|
||||
|
Reference in New Issue
Block a user