mirror of
https://github.com/corda/corda.git
synced 2025-06-22 00:57:21 +00:00
Clean up cash tests
Clean up cash tests ahead of anonymisation work. This simplifies some boiler plate setup/teardown and ensures idenities and flows are correctly registered.
This commit is contained in:
@ -6,6 +6,7 @@ import com.google.common.util.concurrent.Futures
|
||||
import com.google.common.util.concurrent.ListenableFuture
|
||||
import net.corda.core.*
|
||||
import net.corda.core.crypto.entropyToKeyPair
|
||||
import net.corda.flows.TxKeyFlow
|
||||
import net.corda.core.identity.PartyAndCertificate
|
||||
import net.corda.core.messaging.RPCOps
|
||||
import net.corda.core.messaging.SingleMessageRecipient
|
||||
@ -287,6 +288,8 @@ class MockNetwork(private val networkSendManuallyPumped: Boolean = false,
|
||||
val node = nodeFactory.create(config, this, networkMapAddress, advertisedServices.toSet(), id, overrideServices, entropyRoot)
|
||||
if (start) {
|
||||
node.setup().start()
|
||||
// Register flows that are normally found via plugins
|
||||
node.registerInitiatedFlow(TxKeyFlow.Provider::class.java)
|
||||
if (threadPerNode && networkMapAddress != null)
|
||||
node.networkMapRegistrationFuture.getOrThrow() // Block and wait for the node to register in the net map.
|
||||
}
|
||||
|
Reference in New Issue
Block a user